v1

latestOpenAPI 3.0.32026-08-0422127127.8 KB
WhatsApp

Send WhatsApp message

Sends a single templated message to a single recipient. Templates need to be registered and pre-approved by WhatsApp.

post/v2/whatsapp/messages

Request body

senderstring

Registered WhatsApp sender number.

  • Must be in international format following the E.164 standard (e.g., +14155238886).
  • Number must be registered with the WhatsApp Business API.
  • Optional. When omitted, the account's sender is used automatically. Accounts with multiple senders must specify one.
recipientstring phone required

Recipient phone number in international format.

  • Must follow E.164 format (e.g., +14155238886 for a US number).
  • No spaces, dashes, or special characters.
  • The recipient must have an active WhatsApp account.
  • Ensure the recipient has opted in to receive WhatsApp messages.
content_type'text' | 'template' | 'custom' required

Type of the message content.

message_refstring

A unique reference ID supplied by your system to track messages.

  • Maximum Length: 500 characters.
  • This message_ref will be included in webhook events, allowing you to correlate sent messages with received events.

Example Usage:

  • Sending a message with message_ref: "order-12345"
  • Receiving a delivery webhook containing message_ref: "order-12345", confirming it was delivered.

Example request

{
  "sender": "14155238886",
  "recipient": "61411122211",
  "content_type": "template",
  "content": {
    "template": {
      "name": "welcome_new_customer",
      "parameters": [
        "Joe"
      ]
    }
  },
  "message_ref": "optional-ref-123"
}

Response

OK

requestobject

Optional metadata (e.g. requestId, traceId)

metaobject

Optional pagination, feature flags, etc.

Example response

{
  "data": {
    "id": "6fdae71c-dad7-4c36-9734-a69693ecf3b4",
    "message_ref": "optional-ref-123",
    "sender": "14155238886",
    "recipient": "61411122211",
    "content_type": "template",
    "content": {
      "template": {
        "name": "welcome_new_customer",
        "parameters": [
          "Joe"
        ]
      }
    },
    "created_at": "2021-01-01T00:00:00Z"
  }
}