curl -X POST "https://backend.conversales.in/api/v1/createTemplate" \
-H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
-H "Content-Type: application/json" \
-d '{
"name": "order_confirmation",
"category": "UTILITY",
"language": "en",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order #{{1}} confirmed",
"example": {
"header_text_named_params": [
{ "param_name": "order_id", "example": "#12345" }
]
}
},
{
"type": "BODY",
"text": "Hi {{1}}, your order for {{2}} has been confirmed and will arrive by {{3}}.",
"example": {
"body_text_named_params": [
{ "param_name": "customer_name", "example": "Jane" },
{ "param_name": "product_name", "example": "Wireless earbuds" },
{ "param_name": "delivery_date", "example": "2025-11-05" }
]
}
},
{
"type": "BUTTONS",
"buttons": [
{ "text": "View Order", "type": "URL", "url": "https://shop.example.com/orders/12345" },
{ "text": "Contact Support", "type": "PHONE_NUMBER", "phone_number": "+15551234567" }
]
}
]
}'
{
"statusCode": 200,
"message": "Template created successfully",
"data": {
"templateId": "template_123456",
"name": "welcome_message",
"status": "PENDING",
"category": "MARKETING"
}
}
Template Operations
Create Template
Create a new WhatsApp message template
POST
/
api
/
v1
/
createTemplate
curl -X POST "https://backend.conversales.in/api/v1/createTemplate" \
-H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
-H "Content-Type: application/json" \
-d '{
"name": "order_confirmation",
"category": "UTILITY",
"language": "en",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order #{{1}} confirmed",
"example": {
"header_text_named_params": [
{ "param_name": "order_id", "example": "#12345" }
]
}
},
{
"type": "BODY",
"text": "Hi {{1}}, your order for {{2}} has been confirmed and will arrive by {{3}}.",
"example": {
"body_text_named_params": [
{ "param_name": "customer_name", "example": "Jane" },
{ "param_name": "product_name", "example": "Wireless earbuds" },
{ "param_name": "delivery_date", "example": "2025-11-05" }
]
}
},
{
"type": "BUTTONS",
"buttons": [
{ "text": "View Order", "type": "URL", "url": "https://shop.example.com/orders/12345" },
{ "text": "Contact Support", "type": "PHONE_NUMBER", "phone_number": "+15551234567" }
]
}
]
}'
{
"statusCode": 200,
"message": "Template created successfully",
"data": {
"templateId": "template_123456",
"name": "welcome_message",
"status": "PENDING",
"category": "MARKETING"
}
}
Authentication
Your API key for authentication
Request Body
Template name (lowercase, underscore separated)
Template category:
MARKETING, UTILITY, or AUTHENTICATIONLanguage code (e.g.,
en, en_US)Array of template components (header, body, footer, buttons)
Show Component Object Properties
Show Component Object Properties
Component type:
HEADER, BODY, FOOTER, BUTTONSHeader format when type=HEADER:
TEXT, IMAGE, VIDEO, DOCUMENT,
LOCATIONText content for BODY/FOOTER or HEADER when format=TEXT
Examples and named parameters for dynamic content
Show Example Properties
Show Example Properties
Media handle/reference for header images or videos
Example link URL for dynamic button URLs
Array of button objects (for BUTTONS component type)
Show Button Object Properties
Show Button Object Properties
Button display text
Button type:
URL, PHONE_NUMBER, QUICK_REPLY, COPY_CODE,
FLOW, MPM, OTP, VOICE_CALLURL for URL type buttons
Phone number for PHONE_NUMBER buttons (E.164 format)
Example text or URL parameter value
Text auto-filled when button is clicked
Flow action identifier for WhatsApp Flows
Flow ID for WhatsApp Flows integration
Screen to navigate to in flow
Icon identifier or URL
OTP type:
ONE_TAP, ZERO_TAP, COPY_CODETerms acceptance flag for zero-tap authentication
Array of supported app identifiers for the button
curl -X POST "https://backend.conversales.in/api/v1/createTemplate" \
-H "X-API-Key: 3kJ9mP2nQ8rT5vW7xY1zA4bC6dE8fG0hI" \
-H "Content-Type: application/json" \
-d '{
"name": "order_confirmation",
"category": "UTILITY",
"language": "en",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order #{{1}} confirmed",
"example": {
"header_text_named_params": [
{ "param_name": "order_id", "example": "#12345" }
]
}
},
{
"type": "BODY",
"text": "Hi {{1}}, your order for {{2}} has been confirmed and will arrive by {{3}}.",
"example": {
"body_text_named_params": [
{ "param_name": "customer_name", "example": "Jane" },
{ "param_name": "product_name", "example": "Wireless earbuds" },
{ "param_name": "delivery_date", "example": "2025-11-05" }
]
}
},
{
"type": "BUTTONS",
"buttons": [
{ "text": "View Order", "type": "URL", "url": "https://shop.example.com/orders/12345" },
{ "text": "Contact Support", "type": "PHONE_NUMBER", "phone_number": "+15551234567" }
]
}
]
}'
{
"statusCode": 200,
"message": "Template created successfully",
"data": {
"templateId": "template_123456",
"name": "welcome_message",
"status": "PENDING",
"category": "MARKETING"
}
}
Templates must be approved by WhatsApp before use. Approval typically takes
24-48 hours.
⌘I