- messaging
- whatsapp_templates
- conversations
- contacts
- orders
- medias
- webhooks
Create a template
POST
/api/v1/whats_app_templates
Request
Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Body Params application/json
whats_app_template
object
required
template_name
string
required
language
string
required
category
string
required
purpose
string
required
whats_app_business_account_id
integer
required
components_attributes
array [object {5}]
required
Example
{
"whats_app_template": {
"template_name": "New Promotion",
"language": "en",
"category": "MARKETING",
"purpose": "promotion",
"whats_app_business_account_id": 456,
"components_attributes": [
{
"component_type": "header",
"data_type": "image"
},
{
"component_type": "body",
"data_type": "text",
"value": "Exciting news! Get 20% off on all items. Use code {{campaign.coupon_code | fallback: 'DEFAULT20', example: 'SUMMER20'}}. Shop now!",
"index": 0
},
{
"component_type": "button",
"sub_type": "quick_reply",
"data_type": "text",
"value": "Shop Now",
"index": 1
}
]
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/whats_app_templates' \
--header 'Content-Type: application/json' \
--header 'Authorization;' \
--data-raw '{
"whats_app_template": {
"template_name": "New Promotion",
"language": "en",
"category": "MARKETING",
"purpose": "promotion",
"whats_app_business_account_id": 456,
"components_attributes": [
{
"component_type": "header",
"data_type": "image"
},
{
"component_type": "body",
"data_type": "text",
"value": "Exciting news! Get 20% off on all items. Use code {{campaign.coupon_code | fallback: '\''DEFAULT20'\'', example: '\''SUMMER20'\''}}. Shop now!",
"index": 0
},
{
"component_type": "button",
"sub_type": "quick_reply",
"data_type": "text",
"value": "Shop Now",
"index": 1
}
]
}
}'
Responses
🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-06-10 07:10:53