Submit a WhatsApp template to Meta for approval. The template must be in draft status and associated with a sender that has a WhatsApp Business Account configured.
curl --request POST \
--url https://api.zavu.dev/v1/templates/{templateId}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"senderId": "sender_abc123",
"category": "UTILITY"
}
'{
"id": "<string>",
"name": "order_confirmation",
"language": "en",
"body": "Hi {{1}}, your order {{2}} has shipped.",
"category": "UTILITY",
"smsBody": "<string>",
"telegramBody": "<string>",
"instagramBody": "<string>",
"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.
Template submitted for approval.
Template name. For WhatsApp, must match the approved template name in Meta.
"order_confirmation"
Language code.
"en"
Default template body with variables: {{1}}, {{2}}, or named variables like {{contact.first_name}}. Used when no channel-specific body is set.
"Hi {{1}}, your order {{2}} has shipped."
WhatsApp template category.
UTILITY, MARKETING, AUTHENTICATION Channel-specific body for SMS messages. Falls back to body if not set.
Channel-specific body for Telegram messages. Falls back to body if not set.
Channel-specific body for Instagram messages. Falls back to body if not set.
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/{templateId}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"senderId": "sender_abc123",
"category": "UTILITY"
}
'{
"id": "<string>",
"name": "order_confirmation",
"language": "en",
"body": "Hi {{1}}, your order {{2}} has shipped.",
"category": "UTILITY",
"smsBody": "<string>",
"telegramBody": "<string>",
"instagramBody": "<string>",
"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"
}