curl --request POST \
--url https://api.watx.in/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+919876543210",
"type": "text",
"text": "Your order has been packed."
}
'{
"data": {
"message_id": "9d1f4b2a-6c3e-4a51-bf2d-0a7c9e114b3f",
"whatsapp_message_id": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgS",
"conversation_id": "3c5b1e77-90aa-4c0e-8f71-1d2a3b4c5d6e",
"contact_id": "7e2d9c01-55b4-4a3d-9c8e-0f1a2b3c4d5e",
"contact_created": false
}
}{
"error": {
"code": "bad_request",
"message": "'to' must be a valid phone number in E.164 format (e.g. +14155550123)"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key"
}
}{
"error": {
"code": "bad_request",
"message": "'phone' is required"
}
}{
"error": {
"code": "forbidden",
"message": "This API key is missing the 'messages:send' scope"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for this API key"
}
}{
"error": {
"code": "meta_error",
"message": "Meta API error: (#132000) Number of parameters does not match the expected number of params"
}
}Send a message
Sends a WhatsApp message to a phone number. You pass a number, not an internal id: the endpoint finds or creates the contact and the WhatsApp conversation, then sends.
A free-form message (text or media) only reaches a customer inside the
24-hour customer service window. Outside it, send type: "template"
with an approved template.
Requires the messages:send scope.
curl --request POST \
--url https://api.watx.in/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+919876543210",
"type": "text",
"text": "Your order has been packed."
}
'{
"data": {
"message_id": "9d1f4b2a-6c3e-4a51-bf2d-0a7c9e114b3f",
"whatsapp_message_id": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgS",
"conversation_id": "3c5b1e77-90aa-4c0e-8f71-1d2a3b4c5d6e",
"contact_id": "7e2d9c01-55b4-4a3d-9c8e-0f1a2b3c4d5e",
"contact_created": false
}
}{
"error": {
"code": "bad_request",
"message": "'to' must be a valid phone number in E.164 format (e.g. +14155550123)"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key"
}
}{
"error": {
"code": "bad_request",
"message": "'phone' is required"
}
}{
"error": {
"code": "forbidden",
"message": "This API key is missing the 'messages:send' scope"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for this API key"
}
}{
"error": {
"code": "meta_error",
"message": "Meta API error: (#132000) Number of parameters does not match the expected number of params"
}
}Authorizations
Your workspace API key, created in Settings → API keys, sent as
Authorization: Bearer <key>. New keys start with watx_live_; keys
issued before the rename start with converse360_live_ and still work.
Body
The recipient's phone number in E.164 form, for example
+919876543210. A number without a country code is read using the
workspace's default country.
"+919876543210"
What kind of message to send.
text, template, image, video, document, audio The message body for type: "text", or the caption for an image,
video or document. A caption is capped at 1024 characters.
Public URL of the file. Required for image, video, document
and audio.
The file name shown in the chat for a document.
A name for the contact. Used when this number is new, and updates the name if it differs from the one on file.
Required for type: "template".
Show child attributes
Show child attributes
Quote an earlier message. It must belong to the same conversation.
Response
The message was accepted by WhatsApp and stored.
Show child attributes
Show child attributes