Send a new message
Post the necessary fields for the API to send a new message.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your access token.
conversations/ message. writeOAuthPrivate IntegrationSub-Account TokenRequest
Headers
API Version
v3Body
Type of message being sent
SMSEmailWhatsAppIGFBCustomLive_ChatInternalCommentEmailID of the contact receiving the message
abc123def456ID of the associated appointment
appt123Array of attachment URLs
["https://storage.com/file1.pdf","https://storage.com/file2.jpg"]HTML content of the message
<p>Hello World</p>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.
Hello, how can I help you today?Subject line for email messages
Important UpdateID of message being replied to
msg123ID of message template
template123ID of message thread. For email messages, this is the message ID that contains multiple email messages in the thread
thread123UTC Timestamp (in seconds) at which the message should be scheduled
1669287863ID of conversation provider
provider123Email address to send to, if different from contact's primary email. This should be a valid email address associated with the contact.
[email protected]Mode for email replies
replyreply_allreply_allPhone number used as the sender number for outbound messages
+1499499299Recipient phone number for outbound messages
+1439499299Message status
deliveredfailedpendingreaddeliveredArray 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.
["userId123","userId456"]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.
user123WhatsApp 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
Conversation ID.
ABC12h2F6uBrIkfXYazbThis contains the email message id (only for Email type). Use this ID to send inbound replies to CRM to create a threaded email.
rnGyqh2F6uBrIkfhFo9AThis is the main Message ID
t22c6DQcTDf3MjRhwf77When sending via the GMB channel, we will be returning list of messageIds instead of single messageId.
Additional response message when sending a workflow message
Message queued successfully.