Skip to content

Send WhatsApp Template Message

POST/v1/messages/whatsapp/template

Sends an outbound WhatsApp template message to a contact. Documented as application/json because the developer docs renderer does not support file upload yet. Optional media should be referenced via whatsAppContent.header_params (for example a canned file id), not as a multipart file.

Body

contactIdstring required
Example:60f1234567890abcdef12345
channelIdstring required
Example:60f8888887890abcdef12345
whatsappTemplateIdstring required
Example:60f7777777890abcdef12345
whatsAppContentobjectTemplate parameters
body_paramsarray[string]
Example:[ "John Doe" ]
header_paramsobjectOptional header parameters. For media templates without multipart upload, include cannedFileId/attachmentType here.
cannedFileIdstring
Example:60faaaaaa7890abcdef12345
attachmentTypeenum: image | video | document
Example:image
attachmentIdstring or nullOptional uploaded/canned attachment id when media is required by the template header.
Example:60f9999997890abcdef12345
virtualIdstring or nullOptional client-generated id for correlating the outbound message.
Example:client-msg-123

Responses

Body

success_codeenum: 200 | 201Numeric success code matching the HTTP response status. required
Example:200
messagestring required
Example:OK
detailsobject required
dataobject required
metaobject
error_codeintegerNumeric error code matching the HTTP response status. required
Example:400
messagestring required
detailsobjectValidation errors are returned as a field-to-messages map; other errors may use arbitrary keys. required
error_codeintegerNumeric error code matching the HTTP response status. required
Example:400
messagestring required
detailsobjectValidation errors are returned as a field-to-messages map; other errors may use arbitrary keys. required
error_codeintegerNumeric error code matching the HTTP response status. required
Example:400
messagestring required
detailsobjectValidation errors are returned as a field-to-messages map; other errors may use arbitrary keys. required