OBJECT

Mutation

link GraphQL Schema definition

1type Mutation {
2
3# Start agent's session with OAuth access token
4#
5# Arguments
6# access_token: The application's access token
7startAgentSession(access_token: String!): StartAgentSessionPayload!
8
9# Stop current agent session by invalidating all existing sessions
10stopAgentSession: StopAgentSessionPayload!
11
12# Add tags to visitor channels that the agent is currently serving.
13#
14# Arguments
15# channel_id: The target visitor channel ID.
16# tags: A list of tags. Only alphanumeric characters, hyphens
17# (-), and underscores (_) are allowed
18addTags(channel_id: ID!, tags: [String!]!): AddTagsPayload!
19
20# Invite an agent to the channel
21#
22# Arguments
23# agent_id: ID of the the agent to be invited into the channel.
24# channel_id: The target channel ID.
25# leave: The requesting agent will leave the channel after the other agent is
26# invited successfully.
27inviteAgent(agent_id: ID!, channel_id: ID!, leave: Boolean): InviteAgentPayload!
28
29# Leave the target channel if the agent has joined the channel or stop listening
30# to the channel if the agent is listening to it
31#
32# Arguments
33# channel_id: The target channel ID.
34leaveChannel(channel_id: ID!): LeaveChannelPayload!
35
36# Listen to the target channel so corresponding subscriptions include activity
37# updates from the channel. Agent can listen to a visitor channel without joining
38# it
39#
40# Arguments
41# channel_id: The target visitor channel ID.
42listenVisitorChannel(channel_id: ID!): ListenVisitorChannelPayload!
43
44# Send a message to target channel.
45#
46# Arguments
47# backoff: Prevent sending the message when the channel is served by another
48# agent. This value is ignored when the agent is in the channel.
49# channel_id: The target channel ID.
50# msg: The message content to be sent to target channel
51# msg_id: A settable custom message ID to identify this message.
52# options: Discrete list of answers that visitor can select from. Note that if an
53# option string contains a '/' character, it will be displayed as two separate
54# options to the visitor.
55sendMessage(
56backoff: Boolean,
57channel_id: ID!,
58msg: String!,
59msg_id: String,
60options: [String!]
61): SendMessagePayload!
62
63# Sends structured message of button template
64#
65# Arguments
66# backoff: Prevent sending the message when the channel is served by another
67# agent. This value is ignored when the agent is in the channel.
68# channel_id: The target channel ID.
69# fallback: The fallback content for widgets that do not support structured
70# messages.
71# buttons: List of buttons to be shown. There should be at least
72# 1 button and at most 3 buttons
73# msg: The message content to be sent. It should not be an empty
74# string and should contain at most 1000 characters
75sendButtonTemplate(
76backoff: Boolean,
77channel_id: ID!,
78fallback: StructuredMessageFallbackInput,
79buttons: [ButtonItemInput!]!,
80msg: String!
81): SendStructuredMessagePayload!
82
83# Sends structured message of list template
84#
85# Arguments
86# backoff: Prevent sending the message when the channel is served by another
87# agent. This value is ignored when the agent is in the channel.
88# channel_id: The target channel ID.
89# fallback: The fallback content for widgets that do not support structured
90# messages.
91# buttons: List of buttons to be shown. There should be at most 1 button
92# items: List of list items. There should be at least 2 items and
93# at most 4 items
94sendListTemplate(
95backoff: Boolean,
96channel_id: ID!,
97fallback: StructuredMessageFallbackInput,
98buttons: [ButtonItemInput],
99items: [ListItemInput!]!
100): SendStructuredMessagePayload!
101
102# Sends structured message of button template
103#
104# Arguments
105# backoff: Prevent sending the message when the channel is served by another
106# agent. This value is ignored when the agent is in the channel.
107# channel_id: The target channel ID.
108# fallback: The fallback content for widgets that do not support structured
109# messages.
110# buttons: List of buttons to be shown. There should be at most 3 buttons
111# panel: The panel content to be sent
112sendPanelTemplate(
113backoff: Boolean,
114channel_id: ID!,
115fallback: StructuredMessageFallbackInput,
116buttons: [ButtonItemInput!],
117panel: PanelInput!
118): SendStructuredMessagePayload!
119
120# Sends structured message of panel template carousel
121#
122# Arguments
123# backoff: Prevent sending the message when the channel is served by another
124# agent. This value is ignored when the agent is in the channel.
125# channel_id: The target channel ID.
126# fallback: The fallback content for widgets that do not support structured
127# messages.
128# items: List of panel template items. There should be at least 2
129# items and at most 10 items
130sendPanelTemplateCarousel(
131backoff: Boolean,
132channel_id: ID!,
133fallback: StructuredMessageFallbackInput,
134items: [PanelItemInput!]!
135): SendStructuredMessagePayload!
136
137# Sends structured message of quick replies.
138#
139# Arguments
140# backoff: Prevent sending the message when the channel is served by another
141# agent. This value is ignored when the agent is in the channel.
142# channel_id: The target channel ID.
143# fallback: The fallback content for widgets that do not support structured
144# messages.
145# msg: The message content to be sent. 1000 character limit
146# quick_replies: List of quick reply buttons to be shown. A
147# maximum of 11 quick reply buttons are supported
148sendQuickReplies(
149backoff: Boolean,
150channel_id: ID!,
151fallback: StructuredMessageFallbackInput,
152msg: String!,
153quick_replies: [QuickReplyButtonInput!]!
154): SendStructuredMessagePayload!
155
156# Set a typing indicator in target channel.
157#
158# Arguments
159# backoff: Prevent setting the typing indicator when the channel is served by
160# another agent. This value is ignored when the agent is in the channel.
161# channel_id: The target channel ID.
162# typing: Whether the agent is typing
163setTypingIndicator(
164backoff: Boolean,
165channel_id: ID!,
166typing: Boolean!
167): SetTypingIndicatorPayload!
168
169# Transfer target channel that the agent is currently serving to an online/away
170# department.
171#
172# Arguments
173# channel_id: The target channel ID.
174# department_id: The target Department ID.
175# leave: The agent will leave the channel after channel has been transferred.
176transferToDepartment(
177channel_id: ID!,
178department_id: ID!,
179leave: Boolean
180): TransferToDepartmentPayload!
181
182# Update status of the agent to signify their availability. The widget appears
183# online to visitors only if at least one agent has online or away status. More
184# information on
185# https://chat.zendesk.com/hc/en-us/articles/212016418-Setting-your-availability-status
186#
187# Arguments
188# status: The target agent status
189updateAgentStatus(status: ACTIVE_AGENT_STATUS): UpdateAgentStatusPayload!
190
191# Update visitor's information
192#
193# Arguments
194# display_name: The name of target visitor
195# email: The email of target visitor
196# notes: The notes for target visitor
197# phone: The phone number of target visitor
198# visitor_id: The target visitor ID
199updateVisitorInfo(
200display_name: String,
201email: String,
202notes: String,
203phone: String,
204visitor_id: ID!
205): UpdateVisitorInfoPayload!
206
207# Start agent session with email and password. This operation only works for
208# Zendesk Chat account without Zendesk Support integration and account with [phase
209# 1
210# integration](https://chat.zendesk.com/hc/en-us/articles/360000896607-About-Zendesk-Chat-different-account-types).
211#
212# Arguments
213# email: The email of agent
214# password: The password of agent
215passwordStartAgentSession(
216email: String!,
217password: String!
218): PasswordStartAgentSessionPayload! @deprecated( reason: "Does not support all accounts. Use [OAuth authentication](https://developer.zendesk.com/rest_api/docs/chat/auth#oauth-authentication) instead." )
219
220}

link Required by

This element is not required by anyone