Skip to main content
MessagesVersion: v3

Send a new message

POST/conversations/messages

Post the necessary fields for the API to send a new message.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:conversations/message.write
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3

Body

typestringrequired

Type of message being sent

Available optionsSMSEmailWhatsAppIGFBCustomLive_ChatInternalComment
Example:Email
contactIdstringrequired

ID of the contact receiving the message

Example:abc123def456
appointmentIdstring

ID of the associated appointment

Example:appt123
attachmentsstring[]

Array of attachment URLs

Example:["https://storage.com/file1.pdf","https://storage.com/file2.jpg"]
emailFromstring

Email address to send from

emailCcstring[]

Array of CC email addresses

emailBccstring[]

Array of BCC email addresses

htmlstring

HTML content of the message

Example:<p>Hello World</p>
messagestring

Text content of the message. For InternalComment type, use @username<userId>actualUserId</userId> format to mention team members. The mentioned user IDs must also be included in the mentions array.

Example:Hello, how can I help you today?
subjectstring

Subject line for email messages

Example:Important Update
replyMessageIdstring

ID of message being replied to

Example:msg123
templateIdstring

ID of message template

Example:template123
threadIdstring

ID of message thread. For email messages, this is the message ID that contains multiple email messages in the thread

Example:thread123
scheduledTimestampnumber

UTC Timestamp (in seconds) at which the message should be scheduled

Example:1669287863
conversationProviderIdstring

ID of conversation provider

Example:provider123
emailTostring

Email address to send to, if different from contact's primary email. This should be a valid email address associated with the contact.

emailReplyModestring

Mode for email replies

Available optionsreplyreply_all
Example:reply_all
fromNumberstring

Phone number used as the sender number for outbound messages

Example:+1499499299
toNumberstring

Recipient phone number for outbound messages

Example:+1439499299
statusstringrequired

Message status

Available optionsdeliveredfailedpendingread
Example:delivered
mentionsstring[]

Array of user IDs mentioned in the message. Required for InternalComment type. User IDs correspond to team members tagged with @username<userId>id</userId> format in the message text.

Example:["userId123","userId456"]
userIdstring

Use this field to specify the user who is making the internal comment when type is 'InternalComment'. If not provided, the comment will be attributed to the system or default user.

Example:user123
whatsappobject

WhatsApp specific payload. Use this to send media (image, video, audio, document) on a WhatsApp message. Only applies when type is WhatsApp.

Response

Created the message

conversationIdstringrequired

Conversation ID.

Example:ABC12h2F6uBrIkfXYazb
emailMessageIdstring

This contains the email message id (only for Email type). Use this ID to send inbound replies to CRM to create a threaded email.

Example:rnGyqh2F6uBrIkfhFo9A
messageIdstringrequired

This is the main Message ID

Example:t22c6DQcTDf3MjRhwf77
messageIdsstring[]

When sending via the GMB channel, we will be returning list of messageIds instead of single messageId.

msgstring

Additional response message when sending a workflow message

Example:Message queued successfully.