Create a WhatsApp message template. Note: Templates must be approved by Meta before use.

post/v1/templates

Request

  • Base URL
    https://api.zavu.dev
  • Auth
    HTTP bearer

Request body

namestring required
languagestring required
bodystring required

Default template body. Used when no channel-specific body is set.

smsBodystring

Channel-specific body for SMS. Falls back to body if not set.

telegramBodystring

Channel-specific body for Telegram. Falls back to body if not set.

instagramBodystring

Channel-specific body for Instagram. Falls back to body if not set.

whatsappCategory'UTILITY' | 'MARKETING' | 'AUTHENTICATION'

WhatsApp template category.

headerType'text' | 'image' | 'video' | 'document'

Type of header for the template.

headerContentstring

Header content (text string or media URL).

footerstring

Footer text for the template.

variablesstring[]
addSecurityRecommendationboolean

Add 'Do not share this code' disclaimer. Only for AUTHENTICATION templates.

codeExpirationMinutesinteger

Code expiration time in minutes. Only for AUTHENTICATION templates.

Example request

{
  "buttons": [
    {
      "example": "ORD-12345"
    }
  ]
}

Response

Template created.

idstring required
namestring required

Template name. For WhatsApp, must match the approved template name in Meta.

languagestring required

Language code.

bodystring required

Default template body with variables: positional ({{1}}, {{2}}) or named ({{customer_name}}, {{contact.first_name}}). Templates created in Zavu are submitted to Meta as positional; templates imported from a WhatsApp Business Account keep their original format (named or positional). Used when no channel-specific body is set.

smsBodystring

Channel-specific body for SMS messages. Falls back to body if not set.

telegramBodystring

Channel-specific body for Telegram messages. Falls back to body if not set.

instagramBodystring

Channel-specific body for Instagram messages. Falls back to body if not set.

category'UTILITY' | 'MARKETING' | 'AUTHENTICATION' required

The category the template is billed under. For a template linked to WhatsApp this is the category Meta currently assigns, not the one it was submitted with: Meta can recategorize a template at approval or at any point afterwards, and that changes what the message costs.

A recategorization reaches this field through the template.status_changed webhook, which carries data.category, and through POST /v1/templates/sync, which reconciles it against Meta. Read one of those rather than assuming the category you sent is the one in force.

For a template that was never submitted to WhatsApp, this is the category stored locally, defaulting to UTILITY.

status'draft' | 'pending' | 'approved' | 'rejected'
variablesstring[]

List of variable names for documentation.

headerTypestring

Type of header (text, image, video, document).

headerContentstring

Header content (text or media URL).

footerstring

Footer text for the template.

addSecurityRecommendationboolean

Add 'Do not share this code' disclaimer. Only for AUTHENTICATION templates.

codeExpirationMinutesinteger

Code expiration time in minutes. Only for AUTHENTICATION templates.

createdAtstring date-time
updatedAtstring date-time

Example response

{
  "name": "order_confirmation",
  "language": "en",
  "body": "Hi {{1}}, your order {{2}} has shipped."
}

Changes

    • breaking

      the category response's property type changed from string to no type for status

    • info

      added the non-success response with the status

    • info

      added to the category response property allOf list for the response status

    3 more changes in this revision