Skip to main content
Send a free-form text message, or an interactive message with buttons, to a phone number. If the number is not an existing contact, Xobito auto-creates a minimal contact.
WhatsApp requires an open 24-hour “customer care” window to send free-form text. If the recipient has not messaged your number in the last 24 hours, use POST /messages/template instead.

Endpoint

Required ability: messages.send.

Headers

Path parameters

string
required
Your workspace subdomain.

Body parameters

string
required
Recipient’s phone number in E.164 format.
string
required
Message body. Max 4096 characters.
string
One of text, interactive, cta_url. Defaults to text.
string
Optional header (interactive / cta_url messages). Max 60 characters.
Optional footer. Max 60 characters.
array
Interactive button array. 1–3 items. Each button is { id: string (max 256), title: string (max 20) }.
string
For cta_url messages: the button label. Max 20 characters.
string
For cta_url messages: the URL the button opens.
object
Optional contact payload. Used when auto-creating or updating the contact backing this message. Any of: firstname, lastname, email, country, assigned_id, groups.

Example request

Interactive reply buttons (1–3)

Send a message with tappable reply buttons. When the user taps a button, the id is sent back as an incoming message to your webhook.
cURL
Limits:
  • Max 3 buttons per message
  • Button title max 20 chars
  • Button id max 256 chars (returned verbatim on tap)

CTA URL button (1 URL)

Send a message with a single button that opens a URL in the browser.
cURL
Limits:
  • Only 1 URL button per message (Meta restriction)
  • button_text max 20 chars
  • button_url must be a valid HTTPS/HTTP URL
Button type limits: Meta allows only ONE action type per free-form message — either 1–3 reply buttons OR 1 CTA URL button. To mix button types (Reply + URL + Call), you need a pre-approved Meta template via POST /messages/template.

Example response

200 OK
See Data Types → Message send response.

Auto-created contacts

If phone_number does not match an existing contact, Xobito auto-creates one. The firstname defaults to the phone number unless you supply contact.firstname. contact_created: true indicates a new contact was created.

Error responses

Tracking delivery status

This endpoint returns the initial status (usually sent). To follow delivery progress (delivered, read, failed): The message_id (Meta wamid.*) is the join key between this send response and the status webhook payload’s data.message_id.