Templates
Sync template status
Fetch the latest WhatsApp message template approval and category details from Meta and refresh matching Notifyy CRM templates.
Overview
Use this API to fetch the latest WhatsApp message template approval and category details from Meta and refresh matching Notifyy CRM templates. It requires public api oauth access token authentication and the templates:write scope.
/templates/sync-statuscURL
POSTcurl --request POST \ --url 'https://api.atlascrm.dev/v1/templates/sync-status' \ --header 'Authorization: Bearer nfy_public_api_access_token'Sample Request Body
Sample Response
{ "success": true, "message": "Template sync completed", "data": { "total_fetched_from_meta": 12, "matched": 10, "updated": 2, "unchanged": 8, "not_found": 2, "updated_templates": [ { "template_name": "order_confirmation", "language_code": "en_US", "old_status": "PENDING", "new_status": "APPROVED", "old_category": "MARKETING", "new_category": "UTILITY" } ] }}Status Codes
| Code | Description |
|---|---|
| 200 | Template sync completed. |
| 400 | Request included tenant or user identifiers, or WABA credentials are not configured. |
| 401 | Public API access token is missing, invalid, expired, or revoked. |
| 403 | Access token does not include the templates:write scope. |
Headers
Public API OAuth bearer token. Tenant is derived from this token.
Example: Bearer nfy_public_api_access_token
| Object | Description |
|---|---|
Authorization string | RequiredPublic API OAuth bearer token. Tenant is derived from this token. Example: Bearer nfy_public_api_access_token |
Response fields
Indicates whether the public API request succeeded.
Human-readable summary of the sync result.
Number of WhatsApp templates fetched from Meta.
Number of Meta templates matched to local Notifyy templates by template name and language.
Number of matched templates with status or category changes written locally.
Number of matched templates that did not require status or category updates.
Number of Meta templates that were not found locally.
Templates whose status or category changed during the sync.
Template name returned by Meta.
Template language code used for matching.
Previous local template status.
Latest template status returned by Meta.
Previous local template category.
Latest template category returned by Meta.
| Object | Description |
|---|---|
success boolean | Indicates whether the public API request succeeded. |
message string | Human-readable summary of the sync result. |
data.total_fetched_from_meta integer | Number of WhatsApp templates fetched from Meta. |
data.matched integer | Number of Meta templates matched to local Notifyy templates by template name and language. |
data.updated integer | Number of matched templates with status or category changes written locally. |
data.unchanged integer | Number of matched templates that did not require status or category updates. |
data.not_found integer | Number of Meta templates that were not found locally. |
data.updated_templates UpdatedTemplate[] | Templates whose status or category changed during the sync. |
data.updated_templates[].template_name string | Template name returned by Meta. |
data.updated_templates[].language_code string | Template language code used for matching. |
data.updated_templates[].old_status string | Previous local template status. |
data.updated_templates[].new_status string | Latest template status returned by Meta. |
data.updated_templates[].old_category string | Previous local template category. |
data.updated_templates[].new_category string | Latest template category returned by Meta. |