Skip to main content

Sync Templates from Meta

POST/v1/templates/sync

Import/refresh into the local store whatever templates already exist on Meta's side for this WABA.

Authentication

Send Authorization: Bearer <API_KEY> in the request headers; required scope: templates:manage. Which resources an API Key can reach is determined by its current authorization scope.

Request​

Base URL: https://api.bluehola.com

Request body​

A request body is required.

Request body fields​

FieldTypeRequiredDescription
wabaIdstringYesThe platform's WABA ID
afterstringNoContinuation cursor: the nextCursor from the previous response (at most 512 characters). Omit it to start from the first page

Content-Type: application/json Schema:

{
"type": "object",
"properties": {
"wabaId": {
"type": "string",
"description": "string · required — The platform's WABA ID"
},
"after": {
"type": "string",
"description": "string · optional — continuation cursor: the nextCursor from the previous response; omit it to start from the first page"
}
},
"required": [
"wabaId"
]
}

Response​

StatusDescription
200OK
4xxClient error

200 response schema​

{
"$ref": "#/components/schemas/TemplateSyncResult"
}

For the common error envelope and how to handle it, see Error Codes.

Notes​

Onboarding (Embedded Signup) only creates the WABA and phone number — it never touches templates. But the send path requires a matching local template row, so any template the customer already built in WhatsApp Manager and had approved by Meta cannot be sent through this platform at all until it has been imported (you get 404 template not found for this phone number's WABA). The platform syncs automatically once onboarding completes; this endpoint is the entry point for doing it again manually.

Idempotency and what it overwrites​

  • Matched on (wabaId, name, language): an existing row is updated, a missing one is inserted.
  • Updates only overwrite the fields Meta is authoritative for: status / category / components / rejected_reason / metaTemplateId; name and language are left alone.
  • It never deletes local template rows that have no match. Deletion is destructive, and Meta's list is paginated — seeing only part of it and finding "extra" local rows is normal, not a reason to delete them.

Pagination​

One call follows Meta's pagination cursor for at most 5 pages (200 templates per page). When everything has been read, the response has truncated=false and nextCursor=null; otherwise it has truncated=true and a nextCursor — call again with after=<nextCursor> to continue from where it stopped, until truncated=false. Calling again without after starts over from the first page (idempotent, but it will not reach the later pages).

Nothing is submitted to Meta​

This is a pure read plus a local write; it does not consume any of Meta's template review quota and can be called repeatedly and safely.