API that enables Emarsys automation workflows to send pre-approved WhatsApp templates to recipients. This specialized endpoint processes webhook data from Emarsys using a simplified flat key-value format, allowing seamless integration between Emarsys marketing automations and WhatsApp business messaging via CommBox.
JWT token for authentication. The token should be generated using the Secret Key provided in the CommBox Emarsys Module settings.
The encrypted stream identifier for your WhatsApp channel in CommBox
Basic text-only template
{
"to": "9725551234",
"templateName": "simple_notification",
"template.language.code": "en"
}
Template with body parameters
{
"to": "9725551234",
"templateName": "multiple_params_in_body",
"template.language.code": "en_GB",
"body.1.value": "https://www.commbox.io",
"body.2.value": "Product Launch",
"body.3.value": "March 15th"
}
Template with text header and body parameter
{
"to": "9725551234",
"templateName": "text_header_body",
"template.language.code": "en",
"header.type": "text",
"header.value": "Important Update",
"body.1.value": "Your order has shipped"
}
Template with document attachment
{
"to": "9725551234",
"templateName": "document_template",
"template.language.code": "en_US",
"header.type": "document",
"header.value": "https://www.example.com/resources/document.pdf",
"header.filename": "product-catalog.pdf",
"body.1.value": "Our latest catalog"
}
Template with image attachment
{
"to": "9725551234",
"templateName": "image_template",
"template.language.code": "en",
"header.type": "image",
"header.value": "https://www.example.com/images/product.jpg",
"body.1.value": "Check out our new product!"
}
Template with image attachment using Media ID
{
"to": "9725551234",
"templateName": "image_template",
"template.language.code": "en",
"header.type": "image",
"header.value": "913225593849516",
"body.1.value": "Check out our new product!"
}
Template with video attachment
{
"to": "9725551234",
"templateName": "video_template",
"template.language.code": "en",
"header.type": "video",
"header.value": "https://www.example.com/videos/product-demo.mp4",
"body.1.value": "Product demonstration"
}
Template with video attachment using Media ID
{
"to": "9725551234",
"templateName": "video_template",
"template.language.code": "en",
"header.type": "video",
"header.value": "27f8b007-7750-418e-9852-b4f8b7f95b9f",
"body.1.value": "Product demonstration"
}
Template with document attachment using Media ID
{
"to": "9725551234",
"templateName": "document_template",
"template.language.code": "en",
"header.type": "document",
"header.value": "550197337025434",
"header.filename": "file-sample_150kB.pdf",
"body.1.value": "PDF document"
}
Template with dynamic URL button
{
"to": "9725551234",
"templateName": "dynamic_url",
"template.language.code": "en",
"button.value": "https://www.commbox.io/support?user=12345",
"body.1.value": "Click for support"
}
Template with Call a Phone Number button
{
"to": "9725551234",
"templateName": "Call_a_phone_num_btn",
"template.language.code": "en"
}
Template with Call and Visit Website buttons
{
"to": "9725551234",
"templateName": "Call_and_Visit_a_Website_btns",
"template.language.code": "en"
}
Template with Static URL button
{
"to": "9725551234",
"templateName": "static_url",
"template.language.code": "en",
"body.1.value": "Your Name"
}
Template with Quick Reply buttons
{
"to": "9725551234",
"templateName": "3 buttons",
"template.language.code": "en",
"body.1.value": "Your Name"
}
Authentication template with copy button
{
"to": "9725551234",
"templateName": "auth_template",
"template.language.code": "en",
"button.value": "COPY",
"body.1.value": "455455"
}
Template with conversation object creation
{
"to": "9725551234",
"templateName": "customer_support",
"template.language.code": "en",
"body.1.value": "Order #12345",
"object.substreamid": 0,
"object.statusid": 1,
"object.content": "{\"orderId\":\"12345\"}",
"object.user.uniqueid": "67890",
"object.user.lastname": "Doe",
"object.user.firstname": "John",
"object.user.phone1": "9725551234",
"object.user.email": "john.doe@example.com",
"object.user.remarks": "Returning customer"
}
Document template with conversation object creation
{
"to": "9725551234",
"templateName": "doc1",
"template.language.code": "en",
"header.type": "document",
"header.value": "https://denverzoo.org/wp-content/uploads/2018/09/African-lion.pdf",
"header.filename": "African-lion.pdf",
"body.1.value": "hello",
"object.substreamid": 0,
"object.statusid": 1,
"object.content": "{}",
"object.user.uniqueid": "01234567",
"object.user.lastname": "Doe",
"object.user.firstname": "John",
"object.user.phone1": "9725551234",
"object.user.email": "john.doe@example.com",
"object.user.remarks": "some remark for user"
}
Scheduled template message
{
"to": "9725551234",
"templateName": "reminder",
"template.language.code": "en",
"body.1.value": "appointment tomorrow",
"schedule": 1739365010
}
Request schema for sending WhatsApp template messages. The minimal required parameters are to, templateName, and template.language.code. Additional parameters depend on the template structure and whether conversation objects should be created in CommBox.
The recipient's phone number with country code (no + symbol)
The name of the approved WhatsApp template
The language code for the template
Unix timestamp for scheduled message delivery (optional)
Type of header content (if template has a header)
Content for the header (URL or Media ID)
Filename for document attachments (required for document headers)
Content for the first body placeholder
Content for the second body placeholder
Content for the third body placeholder
Dynamic value for button (if template has dynamic buttons)
The substream ID in CommBox (for conversation object creation)
The status ID in CommBox (for conversation object creation)
Additional content for the conversation object (JSON string)
Unique identifier for the user
User's last name
User's first name
User's phone number
User's email address
Additional notes about the user
Request schema for sending WhatsApp template messages. The minimal required parameters are to, templateName, and template.language.code. Additional parameters depend on the template structure and whether conversation objects should be created in CommBox.
The recipient's phone number with country code (no + symbol)
The name of the approved WhatsApp template
The language code for the template
Unix timestamp for scheduled message delivery (optional)
Type of header content (if template has a header)
Content for the header (URL or Media ID)
Filename for document attachments (required for document headers)
Content for the first body placeholder
Content for the second body placeholder
Content for the third body placeholder
Dynamic value for button (if template has dynamic buttons)
The substream ID in CommBox (for conversation object creation)
The status ID in CommBox (for conversation object creation)
Additional content for the conversation object (JSON string)
Unique identifier for the user
User's last name
User's first name
User's phone number
User's email address
Additional notes about the user
Operation successful
{
"status": "200",
"description": "Operation successful",
"response_time": "2024-08-06T07:51:52.258Z",
"data": [
{
"recipient": "9725551234",
"id": "gBEGlyVGZjUpAgmyuqAHfxbHmnQ",
"status": 200,
"object_id": 38383744
}
]
}
Status code as string
Human-readable description of the response
Timestamp of the response
Array of recipient results
Recipient's phone number
Message ID from WhatsApp
Status code for this recipient
CommBox conversation object ID (if created)
Partial success (some messages succeeded, some failed)
{
"status": "206",
"description": "Some messages failed",
"response_time": "2024-08-06T07:51:52.258Z",
"data": [
{
"recipient": "9725551234",
"id": "gBEGlyVGZjUpAgmyuqAHfxbHmnQ",
"status": 200,
"object_id": 38383744
},
{
"recipient": "9725559876",
"status": 400,
"failed": "invalid — Not a valid WhatsApp user"
}
]
}
Status code as string
Human-readable description of the response
Timestamp of the response
Array of recipient results (mix of success and failure)
Bad request, could not process the input data
{
"status": "400",
"description": "Missing parameter templateName",
"response_time": "2024-08-06T07:51:52.258Z",
"data": [
{
"recipient": "9725551234",
"status": 400,
"failed": "Missing required parameter"
}
]
}
Error status code as string
Human-readable description of the error
Timestamp of the response
Array of recipient error details
Recipient's phone number
Error status code
Failure reason
Unauthorized - The supplied JWT credentials are not sufficient to access the resource
Not found - The requested resource is not found
Too Many Requests - Too many requests have been made in a short period of time (Throttling)
Server Error - The server could not return the representation due to an internal server error
Not Implemented - The requested operation is not supported