Skip to content

Messages

On WhatsApp, send an approved template at any time, or a free-form message (text, image, video, document, audio, location, buttons, list, CTA link) in the 24-hour customer window with zero Meta template fees. On Instagram and Facebook, send text in that window. Then follow the message until it is delivered or read.

These examples use a placeholder address. Your console shows the exact address of the API for your workspace.

  • Free WhatsApp 24-hour window (Service Conversations): in the 24 hours following the customer's last message, all free-form messages (text, image, video, PDF document, audio, GPS location, interactive buttons, dropdown lists, CTA links) incur 100% zero Meta template fees. Outside 24 hours, only an approved template is allowed.
  • On an Instagram or Facebook connection, to is the platform id (IGSID or PSID) of a person who already wrote to that account, only text is accepted, and their last message must be less than 24 hours old. Otherwise the call fails with not_found (an id that never wrote), outside_customer_window or invalid_request. Texts are limited to 1,000 characters on Instagram and 2,000 on Facebook.
  • Media & interactifs: send images, videos, documents, and audios via public secure HTTPS URLs. Provide quick-reply buttons (1 to 3), dropdown selection lists (up to 10 options), or an external CTA link button.
  • AI Bot Cohabitation: if the Vendrix AI bot is enabled on your WhatsApp test number, pause the bot in Settings > Automation so the AI does not respond in competition with your external project (bus ticketing, airtime recharge, etc.).
  • A live send appears in the business's Inbox like a message from the team, and its status changes produce message.status_updated events.
  • Statuses of an outbound message: queued, sent, delivered, read, failed, uncertain. uncertain carries the error delivery_uncertain and means Meta may have received the message before the connection dropped: check the conversation before sending it again, the API never retries it on its own.
curl -X POST "https://vendrix-api-7897083941.europe-west4.run.app/api/public/v1/messages" \
  -H "Authorization: Bearer $VENDRIX_API_KEY" \
  -H "Idempotency-Key: ig-reply-1042" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_id": "3d5f7a91-2b4c-4e68-9a0b-1c2d3e4f5a67",
    "to": "17841400000000001",
    "type": "text",
    "text": {
      "body": "Yes, it is in stock in blue."
    }
  }'
curl -X POST "https://vendrix-api-7897083941.europe-west4.run.app/api/public/v1/messages" \
  -H "Authorization: Bearer $VENDRIX_API_KEY" \
  -H "Idempotency-Key: ticket-1042-image" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_id": "6f0a3b1c-9d2e-4f50-8a71-3c5e7d9b1a24",
    "to": "+237670000000",
    "type": "image",
    "image": {
      "url": "https://example.com/tickets/ticket-1042.jpg",
      "caption": "Voici votre ticket de réservation pour le bus de 14h."
    },
    "client_reference": "ticket-1042"
  }'

POST /messages

Sends a message from one of your connections and returns it with the queued status. On WhatsApp send either a template, at any time, or a text or image, inside the 24-hour customer window. On Instagram and Facebook send a text, inside that window.

  • Exactly one of text, template or image must be present, matching type.
  • The number of template.variables must equal the variable_count of the template.
  • Repeating the call with the same Idempotency-Key and body does not send a second message. See idempotency.
Required scope
messages.send
HTTP
Success: HTTP 202

Parameters

Parameters
NameDescription
Idempotency-Key

string (1 to 255 characters)
Header · Required

Identifies this send. 1 to 255 printable ASCII characters.
connection_id

string (UUID)
Body · Required

The id of the connection to send from. It must be active.
to

string (E.164 on WhatsApp, IGSID/PSID on Instagram/Facebook)
Body · Required

The recipient. On WhatsApp, a phone number in E.164 format, with or without the leading +. On Instagram and Facebook, the platform id (IGSID or PSID) of a person who already wrote to the account.
type

text | template | image | video | document | audio | location | buttons | list | cta_url
Body · Required

text, template, image, video, document, audio, location, buttons, list or cta_url.
text.body

string (1 to 4,096 characters)
Body · Optional

The text of the message, 1 to 4,096 characters (1,000 on Instagram, 2,000 on Facebook). Only for type: text.
template.name

string
Body · Optional

The name of an approved template. Only for type: template.
template.language

string
Body · Optional

The language code of that template, such as fr.
template.variables

string[] (0 to 10)
Body · Optional

The values of the template variables, in order. Each is 1 to 1,024 characters.
image.url

string (HTTPS URL)
Body · Optional

The public HTTPS URL of the image (up to 2,048 characters). Only for type: image.
image.caption

string (0 to 1,024 characters)
Body · Optional

The text caption accompanying the image (up to 1,024 characters). Optional, only for type: image.
video.url

string (HTTPS URL)
Body · Optional

The public HTTPS URL of the video (up to 2,048 characters). Only for type: video.
video.caption

string (0 to 1,024 characters)
Body · Optional

The text caption accompanying the video (up to 1,024 characters). Optional, only for type: video.
document.url

string (HTTPS URL)
Body · Optional

The public HTTPS URL of the document (PDF, etc., up to 2,048 characters). Only for type: document.
document.filename

string (0 to 256 characters)
Body · Optional

The filename displayed for the document (up to 256 characters). Optional, only for type: document.
document.caption

string (0 to 1,024 characters)
Body · Optional

The caption accompanying the document (up to 1,024 characters). Optional, only for type: document.
audio.url

string (HTTPS URL)
Body · Optional

The public HTTPS URL of the audio file (up to 2,048 characters). Only for type: audio.
location.latitude

number (-90 to 90)
Body · Optional

The geographic latitude (-90.0 to 90.0). Only for type: location.
location.longitude

number (-180 to 180)
Body · Optional

The geographic longitude (-180.0 to 180.0). Only for type: location.
location.name

string (0 to 256 characters)
Body · Optional

The name of the location (up to 256 characters). Optional, only for type: location.
location.address

string (0 to 512 characters)
Body · Optional

The postal or descriptive address of the location (up to 512 characters). Optional, only for type: location.
buttons.body

string (1 to 1,024 characters)
Body · Optional

The main text body accompanying the quick-reply buttons (up to 1,024 characters). Only for type: buttons.
buttons.buttons

ActionButton[] (1 to 3 buttons)
Body · Optional

The list of 1 to 3 action buttons (id and title up to 20 characters). Only for type: buttons.
buttons.header

string (0 to 60 characters)
Body · Optional

Optional header text above the message (up to 60 characters).
buttons.footer

string (0 to 60 characters)
Body · Optional

Optional footer text below the message (up to 60 characters).
list.body

string (1 to 1,024 characters)
Body · Optional

The main text body of the selection menu (up to 1,024 characters). Only for type: list.
list.button_text

string (1 to 20 characters)
Body · Optional

The button label opening the menu list (up to 20 characters). Only for type: list.
list.sections

ListSection[] (1 to 10 sections, total rows <= 10)
Body · Optional

The sections containing menu rows (1 to 10 rows total). Only for type: list.
list.header

string (0 to 60 characters)
Body · Optional

Optional header text for the menu (up to 60 characters).
list.footer

string (0 to 60 characters)
Body · Optional

Optional footer text for the menu (up to 60 characters).
cta_url.body

string (1 to 1,024 characters)
Body · Optional

The main text body of the call-to-action message (up to 1,024 characters). Only for type: cta_url.
cta_url.display_text

string (1 to 20 characters)
Body · Optional

The label shown on the CTA link button (up to 20 characters). Only for type: cta_url.
cta_url.url

string (HTTPS URL)
Body · Optional

The target HTTPS URL opened on tap (up to 2,048 characters). Only for type: cta_url.
cta_url.header

string (0 to 60 characters)
Body · Optional

Optional header text for the CTA message (up to 60 characters).
cta_url.footer

string (0 to 60 characters)
Body · Optional

Optional footer text for the CTA message (up to 60 characters).
client_reference

string (1 to 128 characters)
Body · Optional

Your own reference, returned on the message and in its events.

Errors

Any authenticated endpoint can also return the authentication, scope and rate limit errors listed on the errors page.

Request

curl -X POST "https://vendrix-api-7897083941.europe-west4.run.app/api/public/v1/messages" \
  -H "Authorization: Bearer $VENDRIX_API_KEY" \
  -H "Idempotency-Key: order-1042-confirmation" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_id": "6f0a3b1c-9d2e-4f50-8a71-3c5e7d9b1a24",
    "to": "+237670000000",
    "type": "template",
    "template": {
      "name": "order_confirmation",
      "language": "fr",
      "variables": [
        "Awa",
        "1042"
      ]
    },
    "client_reference": "order-1042"
  }'

Response

202 Accepted
{
  "id": "1b2c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
  "object": "message",
  "direction": "outbound",
  "channel": "whatsapp",
  "connection_id": "6f0a3b1c-9d2e-4f50-8a71-3c5e7d9b1a24",
  "to": "+237670000000",
  "from": null,
  "type": "template",
  "text": null,
  "template": {
    "name": "order_confirmation",
    "language": "fr"
  },
  "status": "queued",
  "error": null,
  "client_reference": "order-1042",
  "created_at": "2026-10-14T09:30:00Z",
  "updated_at": "2026-10-14T09:30:00Z",
  "livemode": true
}

GET /messages/{id}

Returns a message and its current status.

  • A live key can read the messages sent through the developer API by any application of the workspace, and the inbound customer messages of its connections. Any other id is 404 not_found.
  • A sandbox key reads the sandbox messages of its own application.
Required scope
messages.read
HTTP
Success: HTTP 200

Parameters

Parameters
NameDescription
id

string (UUID)
Path · Required

The id of the message.

Errors

Any authenticated endpoint can also return the authentication, scope and rate limit errors listed on the errors page.

Request

curl "https://vendrix-api-7897083941.europe-west4.run.app/api/public/v1/messages/1b2c4d5e-6f70-4812-9a3b-4c5d6e7f8091" \
  -H "Authorization: Bearer $VENDRIX_API_KEY"

Response

200 OK
{
  "id": "1b2c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
  "object": "message",
  "direction": "outbound",
  "channel": "whatsapp",
  "connection_id": "6f0a3b1c-9d2e-4f50-8a71-3c5e7d9b1a24",
  "to": "+237670000000",
  "from": null,
  "type": "template",
  "text": null,
  "template": {
    "name": "order_confirmation",
    "language": "fr"
  },
  "status": "delivered",
  "error": null,
  "client_reference": "order-1042",
  "created_at": "2026-10-14T09:30:00Z",
  "updated_at": "2026-10-14T09:30:07Z",
  "livemode": true
}