Only customers who lease numbers that support WhatsApp can use this endpoint.
Phone numbers must be in E.164 format with country codes.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Recipient's WhatsApp number. Must be in E.164 format.
Example:
"+1234567890"
The WhatsApp message to send
Example:
"Hello, world!"
Your leased WhatsApp number. If none is provided, we will use a random WhatsApp number of yours.
Example:
"+15555555555"
Should Contiguity fallback to SMS/RCS if the recipient does not have WhatsApp, or if WhatsApp fails to send?
Example:
{
"when": ["whatsapp_unsupported", "whatsapp_fails"],
"from": "+15555555555"
}
Attachments to send. Can be a URL to your attachment (e.g. example.com/image.png) or a base64 string. Max 10 attachments, with a cumulative size of 50MB.
Example:
[
"https://example.com/image.png",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAPUlEQVR4nGNgYGBgAAABAAABATDeu7sAAAAASUVORK5CYII="
]