ReferenceMessaging

sendMessage mutation

Adds a message to a message thread using its ID. If attachments were uploaded using the attachment service, they can also be added to the message thread as well.

Syntax

1mutation {
2 sendMessage(
5}

Example

1mutation {
2 sendMessage(
3 input: {
4 attachmentIds: [
5 "b3f7beb8-5641-11ee-8c99-0242ac120002",
6 "b9ee73de-5641-11ee-8c99-0242ac120002"
7 ],
8 body: "Thank you for the booking.",
9 clientMutationId: "c81529c6-5641-11ee-8c99-0242ac120002",
10 messageThreadId: "cf109fe4-5641-11ee-8c99-0242ac120002"
11 }
12 )
13 {
14 messageId
15 clientMutationId
16 }
17}

Arguments

NameDescription

input

Required.

Message thread ID and message details.

Type: SendMessageInput

Types


Name
Type
ID
ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

SendMessageInput
InputObject

Input parameter to add a message to a message thread.

FieldDescription
attachmentIds

One or more IDs of attachments to be added to the message.

Type: Array of non nullable ID
body

Localized body text (plain text only, HTML tags are not allowed). URLs can be included in the body.

Type: String
clientMutationId

Partner's transaction ID that uniquely identifies the request, which can be used to associate requests and responses for troubleshooting purposes. This ID must be unique across requests and cannot be reused. However, if a request needs to be retried, such as because it failed or timed out, the ID provided in the original request should be used. The ID can be in any format as long as it uniquely identifies the request.

Type: String
messageThreadIdNot nullable.

Message thread ID to which the message is added.

Type: ID
SendMessagePayload
Object

Details about the message added to a message thread.

FieldDescription
clientMutationId

Partner's transaction ID that identifies the request, which can be used to correlate with partner's transaction logs.

Type: String
messageIdNot nullable.

ID of the message that was added.

Type: ID
String
String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.