Skip to main content
POST
Send Message API
Authentication: X-Auth-ID: MA_…, X-Auth-Token, Content-Type: application/json
string
required
Your Vobiz account ID, for example MA_XXXXXXXX.
This endpoint sends these WhatsApp message types: text, image, audio, video, document, sticker, and template. Set the type field to one of these and include the matching object (text, media, or template).
Inbound-only types. WhatsApp also defines interactive (buttons, list pickers), location, and contacts message types. You receive these on inbound messages (see the Webhook Events Reference), and you can offer buttons/URLs/quick replies on outbound template messages (see Templates). To send a structured prompt outside the 24-hour window, use an approved template with buttons rather than a free-form interactive message.

Endpoint

Request Body

string
required
The WhatsApp channel (UUID) to send from.
string
required
The WhatsApp Business Account ID for the channel.
string
required
Recipient phone number in E.164 format, for example +919876543210.
string
required
One of text, template, image, audio, video, document, or sticker.
object
Text message body. Required when type is text. Contains a body string.
object
Shared media object for image, audio, video, document, and sticker. Contains link or id, plus optional caption and filename.
object
Template message payload. Required when type is template. Contains name, language, and optional category and components.

Sending Text Messages

Send plain text messages to your customers. Provide the text object with a body field.
cURL

Sending Media Messages

Send images, audio, video, documents, or stickers. All media types share a single media object. Supply either a public link (HTTPS URL) or a Meta media id.

Media Object Properties

cURL - image example
cURL - document example

Sending Template Messages

Send pre-approved template messages for marketing, authentication, or utility purposes.

Template Object Properties

Templates must be created and approved in Meta Business Manager before you can use them. See our Templates Guide for details.
cURL - template example

Response

Success Response (201 Created)

Returns the created Message object.

Message Object Fields

Common Errors

  • 400 Bad Request - Missing or invalid fields (e.g. missing channel_id, waba_id, to, or type), or a malformed type-specific object.
  • 401 Unauthorized - Missing or invalid authentication credentials.
  • 403 Forbidden - Valid credentials but insufficient permissions for the channel.
A 2xx from Vobiz means the message was accepted, not delivered. A message can still end as failed later - watch the message.status webhook for the final state and any error reason from Meta.

The 24-hour window (most common real-world failure)

WhatsApp only lets you send free-form messages (text and media) within 24 hours of the customer’s last inbound message. Outside that window - including the first message to a contact who has never replied - you can send only an approved template.
  • Inside the window: any type works. Each new inbound message from the customer resets the 24h timer.
  • Outside the window: send type: "template". A free-form send is rejected by WhatsApp; the rejection surfaces as a failed status on the message.status webhook.
  • Open a new window: sending a template (re)opens a fresh 24-hour service window once the customer replies.
If you are unsure whether the window is open, send an approved template. Templates are always allowed; free-form messages are not.

Idempotency and correlation

  • The response id is the Vobiz message UUID. The Meta id (wamid) arrives as meta_message_id once Meta accepts the message - it is null in the initial 201 response.
  • Correlate later message.status webhooks back to the send using the wamid (the statuses[].id in the webhook equals meta_message_id).