Skip to main content

Messages

Quick Overview

Send text or template messages to recipients and react to stored messages using the Public API.

Send a Message​

POST /v1/send-message

Send a message to a recipient. You can send a text message (optionally with media) or a template message. If a message is keyword-ignored, no ticket may be created.

Request Body​

FieldTypeRequiredDescription
recipientstringYesRecipient identifier for the target channel.
connectionIdstringNoConnection ID to use. If omitted, the system selects a connection.
connectionNamestringNoConnection name to use. If omitted, the system selects a connection.
quotedMessageIdstringNoID of a stored message to reply to as a quoted reply (supported on WhatsApp, Waapy, Telegram).
queueIdstringNoQueue to assign the resulting ticket to.
messageobjectYesMessage content. See message types below.

Message Types​

Text Message​

{
"recipient": "+1234567890",
"message": {
"type": "text",
"body": "Hello from the Public API",
"medias": [
{
"mediaUrl": "https://example.com/image.png"
}
]
}
}
FieldTypeRequiredDescription
typestringYesMust be text.
bodystringNoMessage body text. Used as caption on the last media when sending multiple media files.
mediasarrayNoUp to 10 media items. Each media is sent as a separate message.
mediaUrlstringNoDeprecated. Use medias instead. Cannot be combined with medias.
mediaBase64stringNoDeprecated. Use medias instead. Cannot be combined with medias.

Notes:

  • Text messages support multiple media via medias (max 10). Each media is sent as a separate message.
  • The body is used as the caption on the last media and sent as a trailing text message on Messenger.
  • mediaUrl and mediaBase64 are deprecated and cannot be combined with medias.

Template Message​

{
"recipient": "+1234567890",
"message": {
"type": "template",
"body": "Optional body text",
"template": {
"name": "welcome_template",
"dynamicData": {}
}
}
}
FieldTypeRequiredDescription
typestringYesMust be template.
bodystringNoOptional body text.
template.namestringYesTemplate name.
template.dynamicDataobjectNoDynamic data for template variables.
template.flexobjectNoRaw LINE Flex container passthrough (LINE only).

Response​

{
"success": true,
"ticketId": "ticket_abc123",
"contactId": "contact_xyz789"
}
FieldTypeDescription
successbooleanIndicates if the request was successful.
ticketIdstring | nullCreated ticket ID. Not present when the message is keyword-ignored.
contactIdstring | nullContact ID of the recipient. Not present when no contact was created.

Errors​

StatusDescription
401Unauthorized (invalid or missing API key).
429Rate limit exceeded or monthly quota reached.
500Internal server error.

Send a Reaction​

POST /v1/send-reaction

Apply an emoji reaction to a stored message. The message is resolved by messageId (from GET /v1/tickets/{ticketId}/messages), so recipient is not required.

Request Body​

{
"messageId": "wamid.HBgMNTU5...",
"reaction": "👍"
}
FieldTypeRequiredDescription
messageIdstringYesID of the stored message to react to.
reactionstringYesSingle emoji. Send an empty string to remove an existing reaction.

Channel Support​

ChannelBehavior
WhatsApp, Waapy, InstagramApply reaction or remove with empty string.
TelegramApply only. Sending empty string returns ERR_REACTION_NOT_ALLOWED.
Messenger, LINENot supported. Returns ERR_REACTION_NOT_SUPPORTED_FOR_CHANNEL.

Response​

{
"success": true,
"messageId": "wamid.HBgMNTU5...",
"ticketId": "ticket_abc123",
"reaction": "👍"
}

When removing a reaction, reaction is null.

Errors​

StatusDescription
400Validation failed or reaction not supported for the channel.
401Unauthorized.
404Message not found.
429Rate limit exceeded.
500Internal server error.