Zernio
Zernio
API Reference

WhatsApp

Templates

List templatesGETCreate templatePOSTGet templateGETUpdate templatePATCHDelete templateDELETEGet template by idGETUpdate template by idPATCHDelete template by idDELETELook up a library templateGET

Business Profile

Get business profileGETUpdate business profilePOSTUpload profile picturePOSTGet display name statusGETRequest display name changePOSTGet business usernameGETGet username suggestionsGETSet business usernamePOSTDelete business usernameDELETE

Groups

List active groupsGETCreate groupPOSTGet group infoGETUpdate group settingsPOSTDelete groupDELETEAdd participantsPOSTRemove participantsDELETECreate invite linkPOSTList join requestsGETApprove join requestsPOSTReject join requestsDELETE

Blocking

Check if a user is blockedGETList blocked usersGETBlock usersPOSTUnblock usersDELETE

Media

Download WhatsApp mediaGET

Conversions

Get CTWA conversions datasetGETProvision CTWA datasetPOSTList conversion eventsGETSend WhatsApp conversion eventPOST

Account Events

List account notificationsGET

Phone Numbers

Get number statusGETRegister a connected WhatsApp number on the Cloud APIPOSTMove a number to another profilePATCHRequest a Meta re-verification code for a BYO WhatsApp numberPOSTVerify the Meta re-verification code for a BYO WhatsApp numberPOST

Calling

Get calling config for an accountGETEnable calling on a numberPOSTUpdate calling configPATCHDisable calling on a numberDELETECheck call permissionGETList call history for an accountGETInitiate outbound callPOSTGet a single callGETEstimate per-minute costGETGet calling config for a numberGETGet a call recordingGETStart caller-ID verification for a customer-brought numberPOSTConfirm the caller-ID verification codePOST

Flows

List flowsGETCreate flowPOSTGet flowGETUpdate flowPATCHDelete flowDELETEGet flow JSON assetGETUpload flow JSONPUTGet flow preview URLGETList flow versionsGETPublish flowPOSTDeprecate flowPOSTSend flow messagePOSTList flow responsesGETGet Flows encryption key statusGETRegister a Flows encryption keyPOST

Sandbox

List your sandbox sessionsGETStart a sandbox activationPOSTRevoke a sandbox sessionDELETE

Other

Get a number's commerce settingsGETLink a catalog to a WhatsApp numberPOSTList the catalogs linked to a WhatsApp numberGETUnlink a catalog from a WhatsApp numberDELETEUpdate a number's commerce settingsPUT
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
WhatsApp

Create template

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/


POST
/v1/whatsapp/templates

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

{  "success": true,  "template": {    "id": "string",    "name": "string",    "status": "string",    "category": "string",    "language": "string",    "message_send_ttl_seconds": 0  }}
Was this page helpful?

List templates

List message templates for the WhatsApp Business Account (WABA) associated with the given account. Templates are fetched directly from the WhatsApp Cloud API. One entry per **name + language**: a multi-language template appears once per language, each with its own Meta `id`.

Get template

Retrieve one message template variant by name. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family.

accountId*string

WhatsApp account ID

name*string

Template name (lowercase, letters/numbers/underscores, must start with a letter)

Match^[a-z][a-z0-9_]*$
category*string

Template category

Value in

  • "AUTHENTICATION"
  • "MARKETING"
  • "UTILITY"
language*string

Template language code (e.g., en_US)

parameter_format?string

Variable style: POSITIONAL ({{1}}, the default) or NAMED ({{customer_name}}). Named templates provide examples via body_text_named_params / header_text_named_params. Inferred as NAMED when omitted but a named-params example is present.

Value in

  • "POSITIONAL"
  • "NAMED"
  • "positional"
  • "named"
components?array<|||||>

Template components (header, body, footer, buttons, carousel, limited_time_offer). Required for custom templates, omit when using library_template_name.

Items1 <= items
library_template_name?string

Name of a pre-built template from Meta's template library (e.g., "appointment_reminder", "auto_pay_reminder_1", "address_update"). When provided, the template is pre-approved by Meta with no review wait. Omit components when using this field.

library_template_body_inputs?

Optional body customizations for library templates. Available options depend on the template (e.g., add_contact_number, add_learn_more_link, add_security_recommendation, add_track_package_link, code_expiration_minutes).

library_template_button_inputs?array<>

Optional button customizations for library templates. Each item specifies button type and configuration (e.g., URL, phone number, quick reply).

message_send_ttl_seconds?integer

Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 (create only) keeps the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).