Create a WhatsApp message template. Note: Templates must be approved by Meta before use.
curl --request POST \
--url https://api.zavu.dev/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_confirmation",
"language": "en",
"body": "Hi {{1}}, your order {{2}} has been confirmed and will ship within 24 hours.",
"whatsappCategory": "UTILITY",
"variables": [
"customer_name",
"order_id"
]
}
'{
"id": "<string>",
"name": "order_confirmation",
"language": "en",
"body": "Hi {{1}}, your order {{2}} has shipped.",
"category": "UTILITY",
"status": "draft",
"variables": [
"<string>"
],
"headerType": "<string>",
"headerContent": "<string>",
"footer": "<string>",
"buttons": [
{
"type": "quick_reply",
"text": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"otpType": "COPY_CODE",
"packageName": "<string>",
"signatureHash": "<string>"
}
],
"addSecurityRecommendation": true,
"codeExpirationMinutes": 45,
"whatsapp": {
"templateName": "<string>",
"namespace": "<string>",
"status": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
WhatsApp template category.
UTILITY, MARKETING, AUTHENTICATION Template buttons (max 3).
3Show child attributes
Add 'Do not share this code' disclaimer. Only for AUTHENTICATION templates.
Code expiration time in minutes. Only for AUTHENTICATION templates.
1 <= x <= 90Template created.
Template name (must match WhatsApp template name).
"order_confirmation"
Language code.
"en"
Template body with variables: {{1}}, {{2}}, etc.
"Hi {{1}}, your order {{2}} has shipped."
WhatsApp template category.
UTILITY, MARKETING, AUTHENTICATION draft, pending, approved, rejected List of variable names for documentation.
Type of header (text, image, video, document).
Header content (text or media URL).
Footer text for the template.
Template buttons.
Show child attributes
Add 'Do not share this code' disclaimer. Only for AUTHENTICATION templates.
Code expiration time in minutes. Only for AUTHENTICATION templates.
1 <= x <= 90WhatsApp-specific template information.
Show child attributes
curl --request POST \
--url https://api.zavu.dev/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_confirmation",
"language": "en",
"body": "Hi {{1}}, your order {{2}} has been confirmed and will ship within 24 hours.",
"whatsappCategory": "UTILITY",
"variables": [
"customer_name",
"order_id"
]
}
'{
"id": "<string>",
"name": "order_confirmation",
"language": "en",
"body": "Hi {{1}}, your order {{2}} has shipped.",
"category": "UTILITY",
"status": "draft",
"variables": [
"<string>"
],
"headerType": "<string>",
"headerContent": "<string>",
"footer": "<string>",
"buttons": [
{
"type": "quick_reply",
"text": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"otpType": "COPY_CODE",
"packageName": "<string>",
"signatureHash": "<string>"
}
],
"addSecurityRecommendation": true,
"codeExpirationMinutes": 45,
"whatsapp": {
"templateName": "<string>",
"namespace": "<string>",
"status": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}