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
| Field | Type | Required | Description |
|---|---|---|---|
recipient | string | Yes | Recipient identifier for the target channel. |
connectionId | string | No | Connection ID to use. If omitted, the system selects a connection. |
connectionName | string | No | Connection name to use. If omitted, the system selects a connection. |
quotedMessageId | string | No | ID of a stored message to reply to as a quoted reply (supported on WhatsApp, Waapy, Telegram). |
queueId | string | No | Queue to assign the resulting ticket to. |
message | object | Yes | Message 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"
}
]
}
}
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be text. |
body | string | No | Message body text. Used as caption on the last media when sending multiple media files. |
medias | array | No | Up to 10 media items. Each media is sent as a separate message. |
mediaUrl | string | No | Deprecated. Use medias instead. Cannot be combined with medias. |
mediaBase64 | string | No | Deprecated. 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
bodyis used as the caption on the last media and sent as a trailing text message on Messenger. mediaUrlandmediaBase64are deprecated and cannot be combined withmedias.
Template Message
{
"recipient": "+1234567890",
"message": {
"type": "template",
"body": "Optional body text",
"template": {
"name": "welcome_template",
"dynamicData": {}
}
}
}
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be template. |
body | string | No | Optional body text. |
template.name | string | Yes | Template name. |
template.dynamicData | object | No | Dynamic data for template variables. |
template.flex | object | No | Raw LINE Flex container passthrough (LINE only). |
Response
{
"success": true,
"ticketId": "ticket_abc123",
"contactId": "contact_xyz789"
}
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
ticketId | string | null | Created ticket ID. Not present when the message is keyword-ignored. |
contactId | string | null | Contact ID of the recipient. Not present when no contact was created. |
Errors
| Status | Description |
|---|---|
| 401 | Unauthorized (invalid or missing API key). |
| 429 | Rate limit exceeded or monthly quota reached. |
| 500 | Internal 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": "👍"
}
| Field | Type | Required | Description |
|---|---|---|---|
messageId | string | Yes | ID of the stored message to react to. |
reaction | string | Yes | Single emoji. Send an empty string to remove an existing reaction. |
Channel Support
| Channel | Behavior |
|---|---|
| WhatsApp, Waapy, Instagram | Apply reaction or remove with empty string. |
| Telegram | Apply only. Sending empty string returns ERR_REACTION_NOT_ALLOWED. |
| Messenger, LINE | Not 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
| Status | Description |
|---|---|
| 400 | Validation failed or reaction not supported for the channel. |
| 401 | Unauthorized. |
| 404 | Message not found. |
| 429 | Rate limit exceeded. |
| 500 | Internal server error. |