Update template by id
Update one variant's components by its Meta id. Name, language and category cannot change.
Meta only allows editing templates in APPROVED, REJECTED or PAUSED state; an approved
template can be edited once per 24 hours and up to 10 times per 30 days. A successful update
sends the variant back to Meta for review, so the status returned here is normally PENDING.
The final outcome arrives on the whatsapp.template.status_updated webhook (which carries the
variant's templateId and language). A variant already in PENDING cannot be edited again
until Meta finishes reviewing it.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Meta template id (numeric).
WhatsApp social account ID
Updated template components
1 <= itemsResponse Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.whatsapp.updateWhatsAppTemplateById({ path: { templateId: 'template_abc123', }, body: { accountId: 'account_abc123', components: [ { type: 'header', format: 'text', }, ], },});console.log(data);{
"success": true,
"template": {
"id": "string",
"name": "string",
"language": "string",
"status": "PENDING"
}
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Get template by id GET
Retrieve one template variant by its Meta id, the id every variant of a family has on its own and the one the `whatsapp.template.status_updated` webhook carries.
Get reviews GET
Returns reviews for a GBP account including ratings, comments, and owner replies. Use nextPageToken for pagination.