Get template
Retrieve a single message template by name.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Template name
Query Parameters
WhatsApp social account ID
Response 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.getWhatsAppTemplate({ path: { templateName: 'Example', }, query: { accountId: 'account_abc123', },});console.log(data);{
"success": true,
"template": {
"id": "string",
"name": "string",
"status": "string",
"category": "string",
"language": "string",
"components": [
{}
]
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Create template POST
Create a new message template. Supports two modes: Custom template: Provide components with your own content. Submitted to Meta for review (can take up to 24h). Library template: Provide library_template_name instead of components to use a pre-built template from Meta's template library. Library templates are pre-approved (no review wait). You can optionally customize parameters and buttons via library_template_body_inputs and library_template_button_inputs. Browse available library templates at: https://business.facebook.com/wa/manage/message-templates/
Update template PATCH
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.