Templates
Create, edit, sync, import and delete WhatsApp message templates with Meta's own bodies; find the business's other accounts to import from; 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. Without one, GET /v1/templates lists every WABA's templates, and create, sync, the template library and media upload use the tenant's preferred WABA: the default number's if that number is connected, else one with a connected number, else the oldest.
| 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 |
| Copy approved templates from another WABA | POST /v1/templates/migrate |
| 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"]] } }
]
}'Meta 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. Each template also carries nullable correct_category, category_update_at (ISO; when Meta will apply a category change), message_send_ttl_seconds, health_status and last_updated_time. If Meta rejects a pagination cursor (error 131059), WhaBuzz restarts the pagination by itself.
#Import from another account
Since Meta's 2026 account model, each partner of a business gets its own WhatsApp account with its own templates, so moving a number from another provider to WhaBuzz does not bring its templates along. POST /v1/templates/migrate with { "waba_id": "<your WhaBuzz WABA>", "source_waba_id": "<the other provider's WABA>" } asks Meta to copy every APPROVED template with green or unknown quality into your WABA, approval kept, then syncs so the copies show in GET /v1/templates. Pass template_ids to retry specific ones. Both accounts must be owned by the same Meta business. The answer lists migrated templates and Meta's reason for each one in failed; a Meta error comes back verbatim with a whabuzz_hint that says what the business owner has to grant. In the console: Templates, then Import from another account. Building your own onboarding? Connect apps: offer to import templates walks through connect, sibling accounts, the prompt, migrate and list with worked requests.
Finding the source account. GET /v1/numbers/{phone_number_id}/sibling-accounts lists the other WhatsApp accounts of the Meta business that owns the number's account, for example your previous provider's, with each one's approved_templates and eligible_templates (what migration accepts; null when WhaBuzz cannot read that account's templates). It only reads from Meta and is cached for ten minutes (?refresh=1 asks again). Listing a business's accounts needs the business_management permission on the access the business gave WhaBuzz; without it the answer is status: "denied" with missing_permission, and you enter the source id by hand. The console asks right after Connect: "We found N other accounts on this Meta business. Import their templates?", with Import or Skip per account.
#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. Status.