> ## Documentation Index
> Fetch the complete documentation index at: https://help.commbox.io/llms.txt
> Use this file to discover all available pages before exploring further.
# Send WhatsApp Templated Message V2
>
This API sends a generated WhatsApp template from the **WhatsApp Business Account** (WABA) to a single recipient or to multiple recipients (up to 20).
**Key New Capabilities of V2 version**
Marketing and Utility Templates may have a header with text or added media (attached document, image, or video), a footer, and a call for action or quick reply buttons.
The API can also create CommBox object(s), support subchannels, and enable scheduled publishing by adding unix timestamp code to the schedule field (see the 'Send a template with text' example).
**Send Templated Message + Object data**
Sending any templated WhatsApp message with Object data also creates a conversation (Object) on the CommBox platform.
**Note:** Adding the **ManagerId** field with the agent’s Id (optional) will ensure the agent is reflected in various reports. Objects without a managerId will display conversations as being initiated by 'customer'.
The required and optional fields are described here: https://www.commbox.io/api/#operation/Create_Object
**Send Templated Message with an Attached Media**
There are two ways to do so:
a) Sending a Templated Message with a link to the file. Example below: 'Send a template with an attachment (doc)'.
OR
b) Use the /whatsapp/uploadmedia/{ENCRYPTED_STREAM_ID} API endpoint to upload the file to WhatsApp servers and then fetch the uploaded file ID from the response for sending a templated message with the attachment ID. See the 'Send a template with an attachment ID (video)' example.
**Authentication Templates**
See the Examples for sending an authentication template.
For more information:
https://help.commbox.io/docs/creating-new-whatsapp-authentication-templates
https://developers.facebook.com/docs/whatsapp/updates-to-pricing/new-template-guidelines/#authentication-templates
## OpenAPI
````json POST /v2/whatsapp/sendtemplatedmessage/{ENCRYPTED_STREAM_ID}
{
"openapi": "3.0.3",
"info": {
"title": "CommBox API",
"x-logo": {
"url": "https://www.commbox.io/logo/commbox_logo_large.png"
},
"version": "2.07",
"termsOfService": "https://www.commbox.io/end-user-license-agreement-eula/",
"contact": {
"name": "commbox",
"url": "https://www.commbox.io",
"email": "contactus@commbox.io"
}
},
"servers": [
{
"url": "https://api.commbox.io/",
"description": "Production server"
}
],
"security": [
{
"BearerAuth": []
}
],
"tags": [
{
"name": "Core",
"description": "
Systemwide verification"
},
{
"name": "Objects",
"description": "
Objects are conversations between the AI Agent or the human agent and the customers, where each segment of the conversation is referred to as a Child. Every conversation must have a designated Stream – a communication channel such as Chat, Email, Text/SMS, etc., through which the conversation takes place.
The Object APIs category concentrates on a specific conversation, where the Stream is part of the identifying parameters. In contrast, the Streams APIs category, the Channel is the focal point of the request, and the objects and users are the filtering aspects."
},
{
"name": "Media",
"description": "Converting media files to Base64"
},
{
"name": "AI Services",
"description": "APIs that provide AI capabilities by the platform. "
},
{
"name": "Streams",
"description": "
Streams are communication channels used in CommBox, such as Chat, WhatsApp, SMS/Text, etc. In the Streams category of APIs, the channel is the focal point of the request, and the objects and users are the filtering aspects. See the Enums Section for available channels and their CommBox code."
},
{
"name": "Tags",
"description": "
Tags are a classification tool for summarizing aspects of the conversation or the user. It can mark the conversation to indicate a new sale or identify a customer as not interested in the product. To help manage the Tags assets, Tags can be grouped with a common identifier."
},
{
"name": "SMS",
"description": "
Sending customers **SMS messages** (Texting) requires an initial opt-in step, which is not offered by CommBox and is the sole responsibility of the sending entity (Business)."
},
{
"name": "WhatsApp",
"description": "
CommBox facilitates activities in **WABA** for the clients. Our platform helps clients create new templates and manage existing ones.
**Opt-in for WhatsApp**
Before sending WhatsApp messages to someone, you must first receive opt-in permission confirming that they wish to receive future messages from you on WhatsApp. This can be done using any channel your business uses to communicate with people — your website, app, email, retail location, etc.- The opt-in must be an active opt-in, which means it must be triggered by a user action, such as entering a phone number or checking a box to indicate consent.
- The opt-in must clearly state your business’ name.
- Clear opt-in messaging so that the customers know what type(s) of messaging they are signing up for.
For more information, please visit: https://developers.facebook.com/docs/whatsapp/guides/opt-in/"
},
{
"name": "Campaigns",
"description": "Send WhatsApp campaigns via an API. Campaigns are reflected in the metrics page in the platform."
},
{
"name": "Users",
"description": "
**Users** are people recorded in CommBox and they include both the business side and the customers.
Managers are APIs that deal with the business personas such as Admins, Agents, Team leaders, etc., and they include **Profiles**, **Presence**, **Assignments**, **Notifications**, and **Teams** sub-categories.
General USERS"
},
{
"name": "Managers",
"description": "
The **MANAGERS** APIs category relates to activities involving the Admins, Team Leaders, Agents, and any other business-related persona. This category includes **Profiles**, **Presence**, **Assignments**, **Notifications**, and **Teams** sub-categories."
},
{
"name": "Profiles",
"description": "
**Profiles** relate to system permissions and enabled activities assigned to a group of agents (managers).
When looking for a specific user, the USER ID is required.
The profile ID is required when selecting a specific profile (See Enum section)."
},
{
"name": "Presence",
"description": "
The Presence APIs relate to the agent availability status. Active and ready for assignment, Busy, or Away from the desk. Additional statuses can be created by the admin."
},
{
"name": "Assignments",
"description": "
The **Assignments** category relates to conversations (Objects) assigned to a specific agent."
},
{
"name": "Teams",
"description": "A Team is a group of agents with specific business agendas, roles, and permissions. Admins and Team Managers can set up Team Managers to create and manage teams and give those teams specific inbox filters, tags, and knowledge-based assets."
},
{
"name": "Audiences",
"description": "The Audiences APIs allow the creation, editing and listing of organizational audiences used for campaigns."
},
{
"name": "Forms",
"description": "The Forms APIs allow agents to assist customers in completing and signing forms issued by the organization. Once the customer submits the form, a new object is created that includes a link to the original conversation and stores the completed, signed form as an attachment."
},
{
"name": "Authentication",
"description": "Authentication APIs provide accessibility to the system."
},
{
"name": "Automation",
"description": "
Automation APIs are related to chatbot capabilities."
},
{
"name": "Transcription",
"description": "
**Transcription** turns a call recording into readable, speaker-attributed messages inside the conversation."
}
],
"x-tagGroups": [
{
"name": "API Calls",
"tags": [
"Core",
"Objects",
"Media",
"AI Services",
"Streams",
"Tags",
"SMS",
"WhatsApp",
"Users",
"Managers",
"Profiles",
"Presence",
"Assignments",
"Teams",
"Audiences",
"Forms",
"Authentication",
"Automation"
]
}
],
"paths": {
"/v2/whatsapp/sendtemplatedmessage/{ENCRYPTED_STREAM_ID}": {
"post": {
"tags": [
"WhatsApp"
],
"summary": "Send WhatsApp Templated Message V2",
"description": "\n\n This API sends a generated WhatsApp template from the **WhatsApp Business Account** (WABA) to a single recipient or to multiple recipients (up to 20).
\n **Key New Capabilities of V2 version**
\nMarketing and Utility Templates may have a header with text or added media (attached document, image, or video), a footer, and a call for action or quick reply buttons.
The API can also create CommBox object(s), support subchannels, and enable scheduled publishing by adding unix timestamp code to the schedule field (see the 'Send a template with text' example).
\n\n **Send Templated Message + Object data**
\n Sending any templated WhatsApp message with Object data also creates a conversation (Object) on the CommBox platform.
**Note:** Adding the **ManagerId** field with the agent’s Id (optional) will ensure the agent is reflected in various reports. Objects without a managerId will display conversations as being initiated by 'customer'.
The required and optional fields are described here: https://www.commbox.io/api/#operation/Create_Object\n\n
**Send Templated Message with an Attached Media**
\n There are two ways to do so: \n\na) Sending a Templated Message with a link to the file. Example below: 'Send a template with an attachment (doc)'.\n
\n OR
\n\nb) Use the /whatsapp/uploadmedia/{ENCRYPTED_STREAM_ID} API endpoint to upload the file to WhatsApp servers and then fetch the uploaded file ID from the response for sending a templated message with the attachment ID. See the 'Send a template with an attachment ID (video)' example. \n\n
**Authentication Templates**
\n\n See the Examples for sending an authentication template.
For more information:\n - https://help.commbox.io/docs/creating-new-whatsapp-authentication-templates
\n - https://developers.facebook.com/docs/whatsapp/updates-to-pricing/new-template-guidelines/#authentication-templates\n ",
"operationId": "Send_Templated_Message_V2",
"parameters": [
{
"name": "ENCRYPTED_STREAM_ID",
"in": "path",
"description": "CommBox generated encryption for the channel",
"required": true,
"schema": {
"$ref": "#/components/parameters/ENCRYPTED_STREAM_ID/schema"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WhatsApp_template"
},
"examples": {
"Send a template with text": {
"value": {
"data": [
{
"schedule": 1739365010,
"template_data": {
"to": "19172537000",
"template": {
"name": "Text Template",
"language": {
"code": "en"
},
"components": []
}
}
}
]
}
},
"Send a template with text + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "Text Template",
"language": {
"code": "en"
},
"components": []
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "19172537000",
"Email": "John.D@gmail.com",
"Remarks": "Returning customer"
}
}
}
]
}
},
"Send a template with 2 body parameters": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "Basic WA template",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Hellooooo"
},
{
"type": "text",
"text": "my friend"
}
]
}
]
}
}
}
]
}
},
"Send a template with header & body parameters": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "Text Header & Body",
"language": {
"code": "he"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "text",
"text": "text1"
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "text2"
}
]
}
]
}
}
}
]
}
},
"Send a template with header & body parameters + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280801",
"template": {
"name": "ren_text_header_body",
"language": {
"code": "he"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "text",
"text": "text1"
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "text2"
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "97253720000",
"Email": "John.Doe@gmail.com",
"Remarks": "some remark for user"
}
}
}
]
}
},
"Send a template with 3 body parameters + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280801",
"template": {
"name": "multiple_params_in_body",
"language": {
"code": "en_GB"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "https://www.commbox.io"
},
{
"type": "text",
"text": "https://www.commbox.io2"
},
{
"type": "text",
"text": "https://www.commbox.io3"
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "97253720000",
"Email": "john.doe@gmail.com",
"Remarks": "some remark for user"
}
}
}
]
}
},
"Send a template with an attachment (image)": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "header_image",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://picsum.photos/200"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "hello"
}
]
}
]
}
}
}
]
}
},
"Send a template with an attachment (image) + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "test_wisspp_4",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://picsum.photos/200"
}
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "97253720000",
"Email": "John.Doe@gmail.com",
"Remarks": "some remark for user"
}
}
}
]
}
},
"Send a template with an attachment (image) ID + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "image1",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"id": "614927520593182"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "JPG"
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 13,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "97253720000",
"Email": "john.doe@gmail.com",
"Remarks": "some remark for user"
}
}
}
]
}
},
"Send a template with an attachment (doc)": {
"value": {
"data": [
{
"template_data": {
"to": "972537280999",
"template": {
"name": "doc1",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "document",
"document": {
"link": "https://denverzoo.org/wp-content/uploads/2018/09/African-lion.pdf",
"filename": "African-lion.pdf"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "hello"
}
]
}
]
}
}
}
]
}
},
"Send a template with an attachment (doc) + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "doc1",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "document",
"document": {
"link": "https://denverzoo.org/wp-content/uploads/2018/09/African-lion.pdf",
"filename": "African-lion.pdf"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "hello"
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "Ron",
"Phone1": "19172537000",
"Email": "john.doe@gmail.com",
"Remarks": "some remark for user"
}
}
}
]
}
},
"Send a template with an attachment (doc) ID + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "header_doc",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "document",
"document": {
"id": "550197337025434",
"filename": "file-sample_150kB.pdf"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "PDF"
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 13,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "97253720000",
"Email": "John.Doe@gmail.com",
"Remarks": "Just checking"
}
}
}
]
}
},
"Send a template with an attachment (video)": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "header_video",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "video",
"video": {
"link": "http://techslides.com/demos/sample-videos/small.mp4"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "hello"
}
]
}
]
}
}
}
]
}
},
"Send a template with an attachment (video) + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "header_video",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "video",
"video": {
"link": "http://techslides.com/demos/sample-videos/small.mp4"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "hello"
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "Ron",
"Phone1": "972537280000",
"Email": "Ron.Doe@gmail.com",
"Remarks": "Sending video files is great"
}
}
}
]
}
},
"Send a template with an attachment (video) ID + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "header_video",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "video",
"video": {
"id": "27f8b007-7750-418e-9852-b4f8b7f95b9f"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Video_20221023_111733_014.mp4"
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 13,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Lin",
"FirstName": "Robert",
"Phone1": "972537280000",
"Email": "Lin.R34@gmail.com",
"Remarks": "Deal of the day"
}
}
}
]
}
},
"Send a Call-to-Action template with 'Call a phone number' button": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "Call_a_phone_num_btn",
"language": {
"code": "en"
},
"components": []
}
}
}
]
}
},
"Send a Call-to-Action template with 'Call a phone number' button + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "Call_a_phone_num_btn",
"language": {
"code": "en"
},
"components": []
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "9725372800000",
"Email": "John.Doe@gmail.com",
"Remarks": "Contatcts buttons are great"
}
}
}
]
}
},
"Send a Call-to-Action template with 'Call a phone number' + 'Visit a website' buttons": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "Call_and_Visit_a_Website_btns",
"language": {
"code": "en"
},
"components": []
}
}
}
]
}
},
"Send a Call-to-Action template with 'Call a phone number' + 'Visit a website' buttons + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "Call_and_Visit_a_Website_btns",
"language": {
"code": "en"
},
"components": []
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "9725372800000",
"Email": "John.Doe@gmail.com",
"Remarks": "Contatcts buttons are great"
}
}
}
]
}
},
"Send a Call-to-Action template with a Static URL button": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "static_url",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Name"
}
]
}
]
}
}
}
]
}
},
"Send a Call-to-Action template with a Static URL button + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "static_url",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Name"
}
]
}
]
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Fox",
"FirstName": "Johnny",
"Phone1": "9725372800000",
"Email": "john.fox53@gmail.com",
"Remarks": "Static URL is great"
}
}
}
}
]
}
},
"Send a Call-to-Action template with a Dynamic URL button": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "dynamic_url",
"language": {
"code": "en"
},
"components": [
{
"type": "button",
"sub_type": "url",
"index": 0,
"parameters": [
{
"type": "text",
"text": "api"
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "name"
}
]
}
]
}
}
}
]
}
},
"Send a Call-to-Action template with a Dynamic URL button + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "19172537000",
"template": {
"name": "url_dyn",
"language": {
"code": "en"
},
"components": [
{
"type": "button",
"sub_type": "url",
"index": 0,
"parameters": [
{
"type": "text",
"text": "api"
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "name"
}
]
}
]
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Fox",
"FirstName": "Johnny",
"Phone1": "9725372800000",
"Email": "john.fox53@gmail.com",
"Remarks": "Dynamic URL is great"
}
}
}
}
]
}
},
"Send a Quick Reply template with 3 buttons": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "3 buttons",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "name"
}
]
}
]
}
}
}
]
}
},
"Send a Quick Reply template with 3 buttons + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "3 buttons",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "name"
}
]
}
]
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 78121,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Doe",
"FirstName": "John",
"Phone1": "9725372800000",
"Email": "John.Doe@gmail.com",
"Remarks": "Quick Reply with 3 Buttons is great"
}
}
}
}
]
}
},
"Send an authentication template": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "auth_template",
"language": {
"code": "en"
},
"components": [
{
"type": "button",
"sub_type": "url",
"index": 0,
"parameters": [
{
"type": "text",
"text": "name"
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "name"
}
]
}
]
}
}
}
]
}
},
"Send an authentication template + Object data": {
"value": {
"data": [
{
"template_data": {
"to": "972537280000",
"template": {
"name": "auth_template",
"language": {
"code": "en"
},
"components": [
{
"type": "button",
"sub_type": "url",
"index": 0,
"parameters": [
{
"type": "text",
"text": "COPY"
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "455455"
}
]
}
]
}
},
"object_data": {
"createChildObject": true,
"SubStreamId": 0,
"StatusId": 1,
"ManagerId": 387123,
"Content": {},
"User": {
"UniqueId": "01234567",
"LastName": "Fox",
"FirstName": "David",
"Phone1": "9725372800000",
"Email": "david.fox53@gmail.com",
"Remarks": "Looking for a new device"
}
}
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Operation successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"example": 200
},
"description": {
"type": "string",
"example": "Operation successful"
},
"response_time": {
"type": "string",
"example": "2024-08-06T07:51:52.2581942Z"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"recipient": {
"type": "string",
"description": "Recipient number",
"example": 972546663529
},
"id": {
"type": "string",
"example": "gBEGlyVGZjUpAgmyuqAHfxbHmnQ"
},
"status": {
"type": "integer",
"format": "int32",
"example": 200
},
"object_id": {
"type": "integer",
"format": "int64",
"example": 38383744,
"description": "Object ID. This is a CommBox generated number (optional)"
}
}
}
}
}
}
}
}
},
"206": {
"description": "Provider returned failure",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": 206
},
"description": {
"type": "string",
"example": "Missing template parameter"
},
"response_time": {
"type": "string",
"example": "2024-08-06T07:51:52.2581942Z"
},
"data": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"recipient": {
"type": "string",
"description": "Recipient number",
"example": 972546663529
},
"id": {
"type": "string",
"example": "gBEGlyVGZjUpAgmyuqAHfxbHmnQ"
},
"status": {
"type": "integer",
"format": "int32",
"example": 200
},
"object_id": {
"type": "integer",
"format": "int64",
"example": 38383744,
"description": "Object ID. This is a CommBox generated number (optional)"
}
}
},
{
"type": "object",
"properties": {
"recipient": {
"type": "string",
"description": "Recipient number",
"example": 972546663529
},
"status": {
"type": "integer",
"format": "int32",
"example": 400
},
"failed": {
"type": "object",
"example": "invalid — Not a valid WhatsApp user"
}
}
}
]
}
}
}
}
}
}
},
"400": {
"description": "Provider returned failure",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": 400
},
"description": {
"type": "string",
"example": "Missing parameter template_name"
},
"response_time": {
"type": "string",
"example": "2024-08-06T07:51:52.2581942Z"
},
"data": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"recipient": {
"type": "string",
"description": "Recipient number",
"example": 972546663529
},
"status": {
"type": "integer",
"format": "int32",
"example": 400
},
"failed": {
"type": "object",
"example": "invalid — Not a valid WhatsApp user"
}
}
}
]
}
}
}
}
}
}
},
"401": {
"description": "Unauthorized - The supplied credentials, if any, are not sufficient to access the resource",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"example": 401
},
"description": {
"type": "string",
"example": "Unauthorized"
},
"response_time": {
"type": "string",
"format": "date-time",
"example": "2025-02-06T07:51:52.2581942Z"
}
}
}
}
}
},
"404": {
"description": "Not found - The requested resource is not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"example": 404
},
"description": {
"type": "string",
"example": "Not Found"
},
"response_time": {
"type": "string",
"format": "date-time",
"example": "2025-02-06T07:51:52.2581942Z"
}
}
}
}
}
},
"429": {
"description": "Too Many Requests - Too many requests have been made in a short period of time (Throttling)",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"example": 429
},
"description": {
"type": "string",
"example": "Too Many Requests"
},
"response_time": {
"type": "string",
"format": "date-time",
"example": "2025-02-06T07:51:52.2581942Z"
}
}
}
}
}
},
"500": {
"description": "Server Error - The server could not return the representation due to an internal server error",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"example": 500
},
"description": {
"type": "string",
"example": "Internal Server Error"
},
"response_time": {
"type": "string",
"format": "date-time",
"example": "2025-02-06T07:51:52.2581942Z"
}
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"WhatsApp_template": {
"type": "object",
"properties": {
"schedule": {
"type": "string",
"description": "(Optional) Enter a Unix timestamp code for the desired scheduled date. Leaving it empty will send the template immediately."
},
"to": {
"type": "integer",
"description": "The recipient's phone number in international format"
},
"template": {
"type": "object",
"description": "Template configuration",
"properties": {
"name": {
"type": "string",
"description": "Name of the approved WhatsApp template"
},
"language": {
"type": "object",
"description": "Specifies the language of the template",
"properties": {
"code": {
"type": "string",
"description": "Language code used by Meta. For example 'en_us'"
}
}
}
}
},
"componentsA": {
"type": "object",
"description": "Components may include the body, header, footer, and buttons of the template",
"properties": {
"type": {
"type": "string",
"description": "The type of component. In this example 'body'"
},
"parameters": {
"type": "object",
"description": "Represents a single parameter for the placeholder",
"properties": {
"type": {
"type": "string",
"description": "The type of parameter. WhatsApp supports \"text\", \"image\", “video”, and \"document\" parameters."
},
"text": {
"type": "string",
"description": "the text entered in the parameter for example \"John\""
}
}
}
}
},
"componentsB": {
"type": "object",
"description": "Components may include the body, header, footer, and buttons of the template",
"properties": {
"type": {
"type": "string",
"description": "The type of component. In this example 'header'"
},
"parametersA": {
"type": "object",
"description": "Represents a single parameter for the placeholder",
"properties": {
"type": {
"type": "string",
"description": "The type of parameter (e.g. image). WhatsApp supports \"text\", \"image\", “video”, and \"document\" parameters."
},
"image": {
"type": "object",
"properties": {
"Link": {
"type": "string",
"description": "The URL for the image attachment (e.g. https://picsum.photos/200)."
},
"id": {
"type": "string",
"description": "Instead of the link, enter media id provided by META when using the Whatsapp_uploadMedia API (e.g. 1628862997611773)"
}
}
}
}
},
"parametersB": {
"type": "object",
"description": "Represents a single parameter for the placeholder",
"properties": {
"type": {
"type": "string",
"description": "The type of parameter. WhatsApp supports \"text\", \"image\", “video”, and \"document\" parameters."
},
"video": {
"type": "object",
"properties": {
"Link": {
"type": "string",
"description": "The URL for the video attachment (e.g http://example.com/video.mp4)."
}
}
}
}
},
"parametersC": {
"type": "object",
"description": "Represents a single parameter for the placeholder",
"properties": {
"type": {
"type": "string",
"description": "The type of parameter. WhatsApp supports \"text\", \"image\", “video”, and \"document\" parameters."
},
"document": {
"type": "object",
"properties": {
"Link": {
"type": "string",
"description": "The URL of the PDF attachment (e.g. https://denverzoo.org/wp-content/uploads/2018/09/African-lion.pdf)."
},
"filename": {
"type": "string",
"description": "The file's name (e.g. African-lion.pdf)"
}
}
}
}
}
}
},
"object_data": {
"type": "object",
"properties": {
"createChildObject": {
"type": "boolean",
"example": true
},
"SubStreamId": {
"type": "integer",
"description": "The subchannel's ID. When there are no subchannels, value is 0",
"example": 0
},
"StatusId": {
"type": "integer",
"description": "Status of conversation - see Enums",
"example": 1
},
"ManagerId": {
"type": "integer",
"description": "ID of the agent",
"example": 78121
},
"Content": {
"type": "object",
"description": "Content of the message"
},
"User": {
"type": "object",
"required": [
"Phone1",
"Email"
],
"properties": {
"UniqueId": {
"type": "string",
"description": "Unique identifier of the customer such as Social Security number or national ID, or a unique ID generated by the organization",
"example": "01234567"
},
"LastName": {
"type": "string",
"example": "Doe"
},
"FirstName": {
"type": "string",
"example": "John"
},
"Phone1": {
"type": "string",
"description": "Phone number including country code",
"example": "442079834000"
},
"Email": {
"type": "string",
"format": "email",
"example": "John.D@gmail.com"
},
"Remarks": {
"type": "string",
"example": "Returning customer"
}
}
}
}
}
}
}
},
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "API key is needed to authorize requests. You can get your API key via the management console. A Bearer Token is needed to be set in the Authorization header of every API call. For additional support you can contact us."
}
}
}
}
````