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

FieldTypeRequiredDescription
phonestringyesE.164 destination
bodystring*Text body / caption (required for text)
content_typestringnoDefaults to text. See media types
template_codestringnoRendered with vars
varsobjectnoTemplate variables
prioritystringnootp · notification · chat · and others
idempotency_keystringnoDeduplicate retries
media_urlstring*Remote file URL for media types
media_base64string*Base64 file instead of a URL
media_filenamestringnoDisplay name
media_mimetypestringnoMIME type
link_url / urlstring*For content_type=link
link_label / ctastringnoButton label
link_titlestringnoCard title
link_descriptionstringnoCard description
link_image_urlstringnoCard image
htmlstring*For content_type=html
subjectstringnoNewsletter title (HTML)
previewstringnoPlain-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

QueryDescription
phoneFilter by account phone number
statequeued · delivered · read · and others
qSearch body / contact
limitPage 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.