The Templates routes. Every body is JSON, and an error always comes back as an object with a code and a message.
GET
/v1/templates
List message templates
Local drafts and the mirror of the WABA's templates, with the status Meta gave each one.
Response (object[])
- idstringRequired
- Zaiped id (templates)
- namestringRequired
- languagestringRequired
- categorystringRequired
- statusstring
- metaTemplateIdstring
- componentsany[]Required
- parameterFormatstring
- ttlSecondsnumber
- variablesstring[]Required
- bodystringRequired
- rejectedReasonstring
- qualityScorestring
curl -X GET "https://zaiped.com/v1/templates" \
-H "Authorization: Bearer zp_..."
POST
/v1/templates
Create a template
Creates the template with Meta's `components` format and, by default, submits it for review right away. Header media is added in the console.
Request body
- namestringRequired
- languagestringRequired
- category"UTILITY" | "MARKETING" | "AUTHENTICATION"Required
- componentsany[]Required
- ttlSecondsnumber
- submitboolean
Response (object)
- idstringRequired
- Zaiped id (templates)
- namestringRequired
- languagestringRequired
- categorystringRequired
- statusstring
- metaTemplateIdstring
- componentsany[]Required
- parameterFormatstring
- ttlSecondsnumber
- variablesstring[]Required
- bodystringRequired
- rejectedReasonstring
- qualityScorestring
curl -X POST "https://zaiped.com/v1/templates" \
-H "Authorization: Bearer zp_..." \
-H "Content-Type: application/json" \
-d '{
"name": "…",
"language": "…",
"category": "UTILITY",
"components": []
}'GET
/v1/templates/{templateId}
Get a template
Path parameters
- templateIdstringRequired
- The template id, as returned by list_templates.
Response (object)
- idstringRequired
- Zaiped id (templates)
- namestringRequired
- languagestringRequired
- categorystringRequired
- statusstring
- metaTemplateIdstring
- componentsany[]Required
- parameterFormatstring
- ttlSecondsnumber
- variablesstring[]Required
- bodystringRequired
- rejectedReasonstring
- qualityScorestring
curl -X GET "https://zaiped.com/v1/templates/YOUR_TEMPLATE_ID" \
-H "Authorization: Bearer zp_..."
PUT
/v1/templates/{templateId}
Edit a submitted template
Meta accepts edits on APPROVED, REJECTED and PAUSED templates and reviews again.
Path parameters
- templateIdstringRequired
- The template id.
Request body
- category"UTILITY" | "MARKETING" | "AUTHENTICATION"Required
- componentsany[]Required
- ttlSecondsnumber
Response (object)
- oktrueRequired
curl -X PUT "https://zaiped.com/v1/templates/YOUR_TEMPLATE_ID" \
-H "Authorization: Bearer zp_..." \
-H "Content-Type: application/json" \
-d '{
"category": "UTILITY",
"components": []
}'DELETE
/v1/templates/{templateId}
Delete a template
Deletes it locally and, if submitted, in the WABA. Meta blocks the name for 30 days after deleting an approved template.
Path parameters
- templateIdstringRequired
- The template id.
Response (object)
- oktrueRequired
curl -X DELETE "https://zaiped.com/v1/templates/YOUR_TEMPLATE_ID" \
-H "Authorization: Bearer zp_..."
POST
/v1/templates/{templateId}/unpause
Unpause a template paused for quality
Path parameters
- templateIdstringRequired
- The template id.
Response (object)
- successbooleanRequired
- reasonstring
curl -X POST "https://zaiped.com/v1/templates/YOUR_TEMPLATE_ID/unpause" \
-H "Authorization: Bearer zp_..."
POST
/v1/templates/sync
Sync templates from the WABA
Re-reads every template from Meta, including ones created in WhatsApp Manager.
Response (object)
- oktrueRequired
curl -X POST "https://zaiped.com/v1/templates/sync" \
-H "Authorization: Bearer zp_..."