Templates
Sync from Meta
Reads templates from Meta for the workspace’s Cloud API channel and saves them with Meta’s status. Only the first page Meta returns (up to 100 templates) is imported; has_more tells you whether Meta has more.
- Console only: owner or admin
- Workspace:
X-Tenant-ID
Headers
CookiestringrequiredThe
whatsappx_sessioncookie the app sets when you sign in. Browsers send it automatically; API keys are not accepted on this endpoint.X-Tenant-IDuuidrequiredWorkspace id. Required for session requests. You can pass
?tenant=<id>instead.
Response
200 OKapplication/json
syncedintegerNumber of templates saved or updated.
has_morebooleantruewhen Meta has more templates than were imported.
Status codes
- 200OK. Templates were imported.
- 400Bad request. The workspace has no Cloud API channel (
connect a WhatsApp Cloud API channel first), or a template could not be saved. - 401Unauthorized. No signed-in session (
unauthorized). - 403Forbidden. API keys can never call this endpoint (
API keys cannot administer workspaces). A signed-in user who is not an owner or admin getsadmin required; a user who is not a member of the workspace getsforbidden. - 502Bad gateway. Meta rejected the request. The message starts with
meta rejected the template request:.