POST /v1/{waba_id}/templates/sync
Reads every template WhatsApp has for a WABA — following pagination to the end — and reconciles it with what Hello has stored: new templates are created, changed ones are updated, and ones no longer on WhatsApp are deleted only if every page was read successfully (a failure part-way through changes nothing, so an error never wipes valid templates).
Use this after creating or editing templates directly on Meta’s Business Manager, or to recover from a gap in webhook delivery.
curl -X POST "$HELLO_API_URL/v1/<your-waba-id>/templates/sync" \ -H "Authorization: Bearer $HELLO_API_KEY"Response 200
Section titled “Response 200”{ "created": 2, "updated": 5, "deleted": 1, "total": 41 }| Field | Type | Description |
|---|---|---|
created |
integer | Templates newly stored |
updated |
integer | Templates whose stored definition changed |
deleted |
integer | Templates removed because WhatsApp no longer has them |
total |
integer | Templates on the WABA after the sync |
Errors
Section titled “Errors”| Status | code |
Cause |
|---|---|---|
401 |
UNAUTHORIZED |
Missing, wrong or disabled API key |
404 |
NOT_FOUND |
No such WABA in your organization |
409 |
ACCOUNT_NOT_REGISTERED |
The WABA has no active, registered number |
422 |
META_REJECTED |
WhatsApp rejected the request |
502 |
META_UNAVAILABLE |
WhatsApp’s API was unreachable, or returned a server error |