whatsapp
Update template
Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
templateNamestring
Template name
accountIdstring
WhatsApp social account ID
components
Updated template components
Items
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.updateWhatsAppTemplate({ path: { templateName: 'Example', }, body: { accountId: 'account_abc123', components: [ { type: 'header', format: 'text', }, ], },});console.log(data);{
"success": true,
"template": {
"id": "string",
"name": "string",
"status": "string"
}
}Empty
{
"error": "Unauthorized"
}{
"error": "Not found"
}