Skip to main content
POST
Create a WhatsApp template

Authorizations

Authorization
string
header
required

Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.

Body

application/json

Attributes of the template to create.

Attributes of a new WhatsApp template. Consumed by whatsapp_templates_create.

name
string
required

Template name, made of lowercase letters, digits, and underscores, up to 512 characters.

Example:

"order_shipped"

language
string
required

Template language code, such as en or en_US.

Example:

"en_US"

category
enum<string>
required

Template category. Possible values:

  • marketing — Promotions, offers, and other marketing content.
  • authentication — One-time passcodes for verifying a user.
  • utility — Transactional updates about an order or an account.
Available options:
marketing,
authentication,
utility
Example:

"utility"

components
(WhatsAppTemplateTextHeaderComponentRequest · object | WhatsAppTemplateMediaHeaderComponentRequest · object | WhatsAppTemplateLocationHeaderComponentRequest · object | WhatsAppTemplateBodyComponentRequest · object | WhatsAppTemplateFooterComponentRequest · object | WhatsAppTemplateButtonsComponentRequest · object)[]
required

Structural components of the template. Each component type can appear once, exactly one body component is required, and type and format values must be lowercase.

Minimum array length: 1

Text header of a new WhatsApp template. Requires text. Consumed by whatsapp_templates_create.

waba_id
string

ID of the WhatsApp Business Account that owns the template, as returned in waba.id by whatsapp_senders_list. Required when your account has more than one, unless sender is set. When both are set, sender must belong to this WhatsApp Business Account.

Example:

"102290129340398"

sender
string

Phone number of a connected sender whose WhatsApp Business Account owns the template, as an alternative to waba_id. When both are set, the sender must belong to waba_id. The leading + is optional.

Pattern: ^\+?\d{6,20}$
Example:

"14155550100"

Response

The created WhatsApp template.

Returned by whatsapp_templates_get and whatsapp_templates_create.

template
WhatsAppTemplate · object
required

A WhatsApp message template with its review status and components. Returned by whatsapp_templates_list, whatsapp_templates_get, and whatsapp_templates_create.