Messages
Send partner hub messages to end users.
Send a message
POST /api/v1/messages
Creates a standalone hub message, not a support conversation.
Headers
Authorization: Bearer <api_key>
Content-Type: application/json
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
phone | string | yes | E.164 destination |
body | string | * | Text body / caption (required for text) |
content_type | string | no | Defaults to text. See media types |
template_code | string | no | Rendered with vars |
vars | object | no | Template variables |
priority | string | no | otp · notification · chat · and others |
idempotency_key | string | no | Deduplicate retries |
media_url | string | * | Remote file URL for media types |
media_base64 | string | * | Base64 file instead of a URL |
media_filename | string | no | Display name |
media_mimetype | string | no | MIME type |
link_url / url | string | * | For content_type=link |
link_label / cta | string | no | Button label |
link_title | string | no | Card title |
link_description | string | no | Card description |
link_image_url | string | no | Card image |
html | string | * | For content_type=html |
subject | string | no | Newsletter title (HTML) |
preview | string | no | Plain-text teaser (HTML) |
Text example
curl -X POST "$API/messages" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+228XXXXXXXX",
"body": "Votre dossier est en cours de traitement.",
"priority": "notification",
"idempotency_key": "seed-dossier-1001"
}'
201 response
{
"message_id": 142,
"ref": "52c22ee01478…",
"phone": "+228XXXXXXXX",
"partner": "seed",
"direction": "out",
"content_type": "text",
"body": "Votre dossier est en cours de traitement.",
"state": "delivered",
"priority": "notification",
"created_at": "2026-07-21 07:10:00"
}
Retrieve a message
GET /api/v1/messages/{message_id}
Returns the message and optional delivery attempts.
List messages
GET /api/v1/messages
| Query | Description |
|---|---|
phone | Filter by account phone number |
state | queued · delivered · read · and others |
q | Search body / contact |
limit | Page size |
Mark read / unread (partner tools)
POST /api/v1/messages/{id}/read
POST /api/v1/messages/{id}/unread
POST /api/v1/messages/read
Agent chat send
POST /api/v1/agent/messages
Used by Partner Hub agents. It can attach to an open support conversation when appropriate. Prefer /messages for automated hub notifications.