Skip to content

Send WhatsApp Template Message

POST/v1/messages/whatsapp/template

Sends an outbound WhatsApp template message to a contact. For media headers, provide exactly one source: fileUrl (public direct media URL), multipart file (not shown in this JSON playground), or whatsAppContent.header_params.cannedFileId. When using media, set header_params.attachmentType to image, video, or document. fileUrl must be a direct file link, not an HTML gallery page.

Body

contactIdstring required
Example:60f1234567890abcdef12345
channelIdstring required
Example:60f8888887890abcdef12345
whatsappTemplateIdstring required
Example:60f7777777890abcdef12345
whatsAppContentobject•Template parameters
body_paramsarray[string]
Example:[ "John Doe" ]
header_paramsobject•Required when sending media. Use cannedFileId or pair fileUrl/multipart file with attachmentType.
cannedFileIdstring•Existing canned file id in the workspace. Do not combine with fileUrl or multipart file.
Example:60faaaaaa7890abcdef12345
attachmentTypeenum: image | video | document•Required when using fileUrl, multipart file, or cannedFileId.
Example:image
fileUrlstring (uri) or null•Public http(s) URL of a direct media file to download and attach. Do not combine with multipart file or cannedFileId.
Example:https://example.com/images/photo.jpg
attachmentIdstring or null•Optional uploaded/canned attachment id when media is required by the template header.
Example:60f9999997890abcdef12345
virtualIdstring or null•Optional client-generated id for correlating the outbound message.
Example:client-msg-123

Responses

Body

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