Templates
Create, edit, sync and delete WhatsApp message templates with Meta's own bodies; track review through events.
Templates are how a business starts a conversation outside the 24-hour window. WhaBuzz passes Meta's template bodies through unchanged. Templates belong to a WABA, so list and create calls take a waba_id.
| Task | Endpoint |
|---|---|
| List (Meta's paging) | GET /v1/templates |
| Read one | GET /v1/templates/{template_id} |
| Create | POST /v1/templates |
| Edit | POST /v1/templates/{template_id} |
| Delete | DELETE /v1/templates/{template_id} |
| Import everything already on the WABA | POST /v1/templates/sync |
| Meta's template library | GET /v1/templates/library |
| Upload header media (get a handle) | POST /v1/templates/media-handle |
#Create
curl -X POST https://api.whabuzz.com/v1/templates \
-H "Authorization: Bearer $WHABUZZ_KEY" -H "Content-Type: application/json" \
-d '{
"waba_id": "26059971920328384",
"name": "renewal_reminder",
"language": "en",
"category": "UTILITY",
"components": [
{ "type": "BODY", "text": "Hi {{1}}, your plan renews on {{2}}.",
"example": { "body_text": [["Kerry", "31 Oct"]] } }
]
}'bashMeta answers with the template id, status (usually PENDING) and category.
#Review and status
Meta reviews templates asynchronously. You hear about the result as a template.status event: APPROVED, REJECTED (with Meta's reason), PAUSED, DISABLED. Also watch template.quality and template.category: Meta can re-categorise a template, which changes what each send costs you at Meta.
Rejection reasons are also kept in status_reason when you list or sync.
#Sync
POST /v1/templates/sync walks the WABA's templates page by page and stores a local copy, so you can list them without hitting Meta each time. Call it once after connecting an existing WABA, and again if you create templates in Meta's own manager.
#Sending
See Sending messages and the template example in Getting started. A template send that Meta rejects (wrong parameter count, unapproved template, paused template) answers with Meta's error and "source":"meta".
This page as Markdown: /guides/templates.md. All docs in one file: /llms-full.txt.