Send Template API
Send text
URL : https://orailap.azurewebsites.net/api/cloud/Dialog
Method : POST
Description
This API allows you to send document, image, video, audio messages with various Parameters and Templates.
Headers : API-KEY : 17Oz1EiIWxb54jAxUaBcQlrXXX
Body:
{
“type”: “template”,
“messaging_product”: “whatsapp”,
“to”: “+91998194xxxx”,
“template”: {
“namespace”: “38f6cdc1_dc4c_41XX_9627_967bb642exxxx”, “language”: {
“policy”: “deterministic”, “code”: “en”
},
“name”: “template_name”
}
}
Parameters
Field : Description
To : The recipient’s phone number to whom you want to send the message. (Number should be pass with country code)
Api_Key : Your API key for authentication(static).
Type : Specify the type “Template” ,”text”,”image” to indicate that you are sending a template,image or document message.
Namespace : A unique namespace identifier (static).
Filename : Dynamic – you can change in any name
Param,Param1,… Params : Additional Parameters(According to the template body{{n}}, you should pass the number of parameter)
Name (Template name) : The Message Template Name (template name, you can check with in 360 credential) .
Language : The Language for the Text Message(you can check the template details in 360 credential).
Media URL : The URL of media need to paste.
Send text message with params
URL : https://orailap.azurewebsites.net/api/cloud/Dialog
Method : POST
Description
This API allows you to send document, image, video, audio messages with various Parameters and Templates.
Headers : API-KEY : 17Oz1EiIWxb54jAxUaBcQlXXXX
Body
{
“type”: “template”,
“messaging_product”: “whatsapp”,
“to”: “+91998194xxxx”,
“template”: {
“namespace”: “38f6cdc1_dc4c_XXXX_9627_967bb642xxxx”, “language”: {
“policy”: “deterministic”, “code”: “en”
},
“name”: “template_name”, “components”: [
{
“type”: “body”, “parameters”: [
{
“type”: “text”,
“text”: “param1”
},
{
“type”: “text”,
“text”: “param2”
},
{
“type”: “text”,
“text”: “param3”
}
]
}
]
}
}
Parameters
Field : Description
To : The recipient’s phone number to whom you want to send the message.
(Number should be pass with country code) : Api_Key Your API key for authentication(static).
Type : Specify the type “Template” ,”text”,”image” to indicate that you are sending a template,image or document message.
Namespace : A unique namespace identifier (static).
Filename : Dynamic – you can change in any name
Param,Param1,… : Additional Parameters(According to the template body{{n}}, you should pass the number Params of parameter and the values )
Name (Template name) : The Message Template Name (template name, you can check with in 360 credential) .
Language : The Language for the Text Message(you can check the template details in 360 credential).
Media URL : The URL of media need to paste.
Send image message’s
URL : https://orailap.azurewebsites.net/api/cloud/Dialog
Method : POST
Description : This API allows you to send document, image, video, audio messages with various Parameters and Templates.
Headers : API-KEY : 17Oz1EiIWxb54jAxUaBcQlXXXX
Body
{
“type”: “template”, “messaging_product”: “whatsapp”, “to”: “+91998194xxxx”,
“template”: {
“namespace”: “38f6cdc1_dc4c_419c_9627_967bb642xxxx”, “language”: {
“policy”: “deterministic”, “code”: “en”
},
“name”: “image_template_name”, “components”: [
{
“type”: “header”, “parameters”: [
{
“type”: “image”, “image”: {
“link”: “https://demo/images/url/109110/109110-demo.jpeg”
}
}
]
},
{
“type”: “body”, “parameters”: [
{
“type”: “text”,
“text”: “param1”
}
]
}
]
}
}
Parameters : Field
Description : To The recipient’s phone number to whom you want to send the message. (Number should be pass with country code)
Api_Key : Your API key for authentication(static).
Type : Specify the type “Template” ,”text”,”image” to indicate that you are sending a template,image or document message.
Namespace : A unique namespace identifier (static).
Filename : Dynamic – you can change in any name
Param,Param1,… : Additional Parameters(According to the template body{{n}}, you should pass the number Params of parameter and the values )
Name : (Template The Message Template Name (template name, you can check with in 360 credential) .
Language : The Language for the Text Message(you can check the template details in 360 credential).
Media URL : The URL of media need to paste.
Send document messages
URL : https://orailap.azurewebsites.net/api/cloud/Dialog
Method : POST
Description : This API allows you to send document, image, video, audio messages with various Parameters and Templates.
Headers : API-KEY : 17Oz1EiIWxb54jAxUaBcQlXXXX
Body:
{
“type”: “template”, “messaging_product”: “whatsapp”, “to”: “+91998194xxxx”,
“template”: {
“namespace”: “38f6cdc1_dc4c_419c_XXXX_967bb642xxxx”, “language”: {
“policy”: “deterministic”, “code”: “en”
},
“name”: “document_template_name”, “components”: [
{
“type”: “header”, “parameters”: [
{
“type”: “document”, “document”: {
“link”: “https://demo/document/url /114099_IM1.pdf-3jmOP.pdf”, “filename”: “”
}
}
]
},
{
“type”: “body”, “parameters”: [
{
“type”: “text”,
“text”: “param1”
}
]
}
]
}
}
Parameters
Field : Description To The recipient’s phone number to whom you want to send the message. (Number should be pass with country code)
Api_Key : Your API key for authentication(static).
Type : Specify the type “Template” ,”text”,”image” to indicate that you are sending a template,image or document message. Namespace A unique namespace identifier (static).
Filename : Dynamic – you can change in any name
Param,Param1,… : Additional Parameters(According to the template body{{n}}, you should pass the number
Name : (Template
The Message Template Name (template name, you can check with in 360 credential) .
Language
The Language for the Text Message(you can check the template details in 360 credential).
Media URL
The URL of media need to paste.
Send Button template
URL : https://orailap.azurewebsites.net/api/cloud/Dialog
Method : POST
Description : This API allows you to send button Templates.
Headers : API-KEY : 17Oz1EiIWxb54jAxUaBcQlrXXX
Content-Type : application/json
Body:
{
“template”: {
“namespace”: “0eb6df9e_483e_4ff2_bda0_d03a2395XXXX”, “name”: “video_hcp_new”,
“components”: [
{
“type”: “body”, “parameters”: [
{
“type”: “text”,
“text”: “test”
}
]
},
{
“index”: 0, “parameters”: [
{
“text”: “https://www.360dialog.com/”, “type”: “text”
}
],
“sub_type”: “url”,
“type”: “button”
}
],
“language”: { “code”: “en”,
“policy”: “deterministic”
}
},
“messaging_product”: “whatsapp”, “to”: “91998194XXXX”,
“type”: “template”
}
Parameters
Field : Description
namespace : A unique identifier for the template.
name : The name of the template. components An array containing the components of the template.
type : The type of component. In this case, it’s “body” for the main message body. parameters Parameters associated with this component.
type: The type of parameter. Here, it’s “text” for plain text.
text: The actual text content of the compon
index : The index of the component.
sub_type : The sub-type of the component. Here, it’s “url”.
language : Information about the language of the template(En,en_us,hi)
to : Specifies the recipient’s phone number to which the message will be sen
Response Message
Status Code : 200
Format : Raw JSON
Response Body
{
“Message”: “Message sent successfully”, “Data”: {
“messaging_product”: “whatsapp”, “contacts”: [
{
“input”: “+91998194xxxx”, “wa_id”: “91998194xxxx”
}
],
“messages”: [
{
“id”: “wamid.HBgMOTE5OTgxOTQ2NDkyFQIAERgSQUY0MkU1RDlCNDgxRUI4QkJxxxx”,
“message_status”: “accepted”
}
]
}
}Parameters
Contacts
An array of objects representing contact information. In this example, it includes the
input and WhatsApp ID.
Messages :An array of message objects, each containing an ID.
Meta : information about the API response, including the API status and version.
Note:-To send this message, the customer must initiate the conversation first in the chat. Otherwise, the message will not be sent to the customer’s end.
Send Carousel
URL : https://orailap.azurewebsites.net/api/cloud/Dialog
Method : POST
Description
This API allows you to send carousel with various Parameters and Templates.
Header: API-KEY : A0O246DRyWsxiIQp1nReMQXXXX.
Body
{
“template”: {
“namespace”: “e3731693_1d6b_47c4_b86e_b14bdd52XXXX”, “name”: “Template_Name”,
“components”: [
{
“type”: “carousel”, “cards”: [
{
“card_index”: 0, “components”: [
{
“type”: “header”, “parameters”: [
{
“type”: “image”, “image”: {
“link”: “https://demo/BROADCAST_TEMPLATE_ATTACHMENT/104509-demo.png”
}
}
]
},
{
“index”: 0, “parameters”: [
{
“payload”: “flow_welcome_104509”, “type”: “payload”
}
],
“sub_type”: “quick_reply”, “type”: “button”
},
{
“index”: 1,
parameters”: [
{
“payload”: “flow_welcome_104509”, “type”: “payload”
}
],
“sub_type”: “quick_reply”, “type”: “button”
}
]
},
{
“card_index”: 1, “components”: [
{
“type”: “header”, “parameters”: [
{
“type”: “image”, “image”: {
“link”: “https://demo/BROADCAST_TEMPLATE_ATTACHMENT/104509-demo.png”
}
}
]
},
{
“index”: 0, “parameters”: [
{
“payload”: “flow_welcome_104509”, “type”: “payload”
}
],
“sub_type”: “quick_reply”, “type”: “button”
},
{
“index”: 1, “parameters”: [
{
“payload”: “flow_welcome_104509”, “type”: “payload”
}
],
“sub_type”: “quick_reply”, “type”: “button”
}
]
}
]
}
],
“language”: { “code”: “en”,
“policy”: “deterministic”
}
},
“messaging_product”: “whatsapp”, “to”: “91998194XXXX”,
“type”: “template”
}
Parameters
Field : Description
PhoneNumber : The recipient’s phone number to whom you want to send the message.
(Number should be pass with country code)
API_KEY : Your API key for authentication(static).
Type : Specify the type as “text” to indicate that you are sending a text message.( it may be image, document, video)
Namespace : A unique namespace identifier (static).
Filename : Dynamic – you can change in any name
Param,Param1,… Params : Additional Parameters(According to the template body{{n}}, you should pass the number of parameter)
Name (Template name) : The Message Template Name (template name, you can check with in 360 credential)
Language : The Language for the Text Message(you can check the template details in 360 credential)
Media URL : The URL of media need to paste.
Response Message
Status Code : 200
Format : Raw JSON
Response Body
{
“contacts”: [
{
“input”: “91998194XXXX”, “wa_id”: “91998194XXXX”
}
],
“messages”: [
{
“id”: “gBEGkZVFcQRyAgl2DP42tXXXXX”
}
],
“meta”: {
“api_status”: “stable”, “version”: “2.49.3”
}
}
Parameters
Contacts : An array of objects representing contact information. In this example, it includ es the
input and WhatsApp ID.
Messages : An array of message objects, each containing an ID
Meta : Meta-information about the API response, including the API status and version.
Note : To send this message, the customer must initiate the conversation first in the chat. Otherwise, the message will not be sent to the customer’s end.
