Skip to content

Messages

Send an approved template at any time, or a text inside the 24-hour window after the customer's last message, 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.

  • A text message needs a message from the customer in the last 24 hours on that conversation. Otherwise the call fails with outside_customer_window and you must send a template.
  • 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.

POST /messages

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

  • Exactly one of text and template 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)
Body · Required

The recipient, in E.164 format, with or without the leading +.
type

text | template
Body · Required

text or template.
text.body

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

The text of the message, 1 to 4,096 characters. 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.
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://api.vendrix.net/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",
  "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 WhatsApp 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://api.vendrix.net/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",
  "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
}