Mutation
mutation SendChat($input: SendChatInput!) {
sendChat(input: $input) {
chat {
id
text
customerReadAt {
unixTimestamp
iso8601
}
attachments {
id
fileName
fileSize {
__typename
}
fileExtension
fileMimeType
type
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerId": "id"
}
}Response
{
"data": {
"sendChat": {
"chat": {
"id": "id",
"text": "string",
"customerReadAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"attachments": [
{
"id": "id",
"fileName": "string",
"fileSize": {
"__typename": "FileSize"
},
"fileExtension": "string",
"fileMimeType": "string",
"type": "EMAIL"
}
],
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
sendChat
Send a chat message from a support agent (or machine user) to a customer on a CHAT-channel thread.
Either text or at least one attachmentIds entry must be provided. If threadId is omitted a new
thread is created; if supplied the message is appended to the existing thread. An optional timestamp
(ISO 8601, must be in the past) allows backdating messages when backfilling historical data.
Requires the chat:create permission and the live-chat billing entitlement.
MUTATION
sendChat(input: SendChatInput!): SendChatOutput!Arguments
input
required
Returns
chat
error
Mutation
mutation SendChat($input: SendChatInput!) {
sendChat(input: $input) {
chat {
id
text
customerReadAt {
unixTimestamp
iso8601
}
attachments {
id
fileName
fileSize {
__typename
}
fileExtension
fileMimeType
type
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerId": "id"
}
}Response
{
"data": {
"sendChat": {
"chat": {
"id": "id",
"text": "string",
"customerReadAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"attachments": [
{
"id": "id",
"fileName": "string",
"fileSize": {
"__typename": "FileSize"
},
"fileExtension": "string",
"fileMimeType": "string",
"type": "EMAIL"
}
],
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

