Sends a WhatsApp message
Sends a single WhatsApp message to a single recipient. The message content comes from a pre-approved WhatsApp template, addressed by template_key or template_alias; The message content is based on the merge_info which provides the values for the template placeholders. from must be a valid WhatsApp sender number configured for the sending agent. Both from and to must include the country code.
The message is queued on acceptance; template-variable and delivery failures surface asynchronously in the message logs (for example, a send with missing template variables is accepted but ends in the process_failed status).
Endpoint
Request URL
https://cpaas.zoho.com/v1.1/whatsapp Copied!
Request Parameters
- Request Headers
API key of an agent. Send the header as Authorization: Zoho-enczapikey {apiKey}. The agent and account are derived from the key.
- Path Parameters
Unique identifier of the SMS message, as returned by the send API (data.message_id) or the logs API.
- Request Body
application/json
Request body for sending a WhatsApp message. Provide exactly one of template_key / template_alias; the template supplies the message content.
Show Sub-Attributes
WhatsApp sender number of the agent, including the country code.
Recipient phone number, including the country code.
Key of a pre-approved WhatsApp template. Provide this or template_alias.
Alias of a pre-approved WhatsApp template. Provide this or template_key.
Key-value map that supplies the template's variables. A message with missing variable values is accepted but fails asynchronously with the process_failed status.
Identifier of the sending agent. Optional - defaults to the agent bound to the API token.
Client-supplied reference identifier, echoed in the message logs.
Sample Request
curl --request POST \
--url https://cpaas.zoho.com/v1.1/whatsapp \
--header 'Authorization: REPLACE_KEY_VALUE' \
--header 'content-type: application/json' \
--data '{"from":"+14155550142","to":"+919876543210","template_key":"d0109d00-b191-11f1-95b1-aaa8828ce996","merge_info":{"code":"234234"},"client_reference":"otp-234234"}'Sample Request Body
{
"from": "+14155550142",
"to": "+919876543210",
"template_key": "d0109d00-b191-11f1-95b1-aaa8828ce996",
"merge_info": {
"code": "234234"
},
"client_reference": "otp-234234"
}
Response Parameters
- HTTP code 200
Response Body - application/json
Success response returned when the WhatsApp message is queued for delivery.
Show Sub-Attributes
Show Sub-Attributes
Acceptance code.
Unique identifier of the message. Use it with the message-details API.
Unique identifier assigned to the send request.
- HTTP code 400
Response Body - application/json
Error response wrapper. The top-level code identifies the error class: TM_3201 mandatory field missing (400), TM_3301 bad syntax (400), TM_4001 access denied (401), TM_3601 request denied (403).
Show Sub-Attributes
Show Sub-Attributes
Show Sub-Attributes
A single validation or denial detail inside the error envelope.
Detail-level error code, e.g. SERR_110 (required parameter missing), GE_102 (mandatory field missing), WA_103 (invalid template), WSE_107 (sender number belongs to a different agent), SERR_157 (invalid API token).
The field the detail refers to, when applicable (e.g. from, to, template_key | template_alias).
The offending value, when applicable.
Identifier of the failed request, when available.
- HTTP code 401
Response Body - application/json
Error response wrapper. The top-level code identifies the error class: TM_3201 mandatory field missing (400), TM_3301 bad syntax (400), TM_4001 access denied (401), TM_3601 request denied (403).
Show Sub-Attributes
Show Sub-Attributes
Show Sub-Attributes
A single validation or denial detail inside the error envelope.
Detail-level error code, e.g. SERR_110 (required parameter missing), GE_102 (mandatory field missing), WA_103 (invalid template), WSE_107 (sender number belongs to a different agent), SERR_157 (invalid API token).
The field the detail refers to, when applicable (e.g. from, to, template_key | template_alias).
The offending value, when applicable.
Identifier of the failed request, when available.
- HTTP code 403
Response Body - application/json
Error response wrapper. The top-level code identifies the error class: TM_3201 mandatory field missing (400), TM_3301 bad syntax (400), TM_4001 access denied (401), TM_3601 request denied (403).
Show Sub-Attributes
Show Sub-Attributes
Show Sub-Attributes
A single validation or denial detail inside the error envelope.
Detail-level error code, e.g. SERR_110 (required parameter missing), GE_102 (mandatory field missing), WA_103 (invalid template), WSE_107 (sender number belongs to a different agent), SERR_157 (invalid API token).
The field the detail refers to, when applicable (e.g. from, to, template_key | template_alias).
The offending value, when applicable.
Identifier of the failed request, when available.
Sample Response: HTTP 200
{
"data": {
"code": "MSG_101",
"message_id": "1ba7d8d0-b680-11f1-91b5-d2a30e0412c2",
"message": "Message queued",
"request_id": "2d6f.14350939.wa1.1ba7d8d0-b680-11f1-91b5-d2a30e0412c2.1a0c9102edd"
},
"status": "success"
}
Sample Response: HTTP 400
{
"error": {
"code": "TM_3301",
"details": [
{
"code": "SERR_110",
"message": "Parameter less than min occurrance",
"target": "to"
}
],
"message": "Bad Syntax"
}
}
{
"error": {
"code": "TM_3201",
"details": [
{
"code": "GE_102",
"message": "Mandatory field found empty",
"target": "template_key | template_alias"
}
],
"message": "Mandatory Field missing"
}
}
Sample Response: HTTP 401
{
"error": {
"code": "TM_4001",
"details": [
{
"code": "SERR_157",
"message": "Invalid API Token found"
}
],
"message": "Access Denied"
}
}
{
"error": {
"code": "TM_4001",
"details": [
{
"code": "WA_103",
"message": "whatsapp.api.template.not.valid"
}
],
"message": "Access Denied"
}
}
Sample Response: HTTP 403
{
"error": {
"code": "TM_3601",
"details": [
{
"code": "WSE_107",
"target_value": "+14155550142",
"message": "whatsapp.sender.sender.added.different.agent",
"target": "from"
}
],
"message": "Request Denied"
}
}
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.