Skip to navigation

Create template

Creates a new template and submits it to Meta for approval. The template is created in PENDING status; Meta reviews it within approximately 1 to 24 hours. The BODY component is required except for carousel-type templates.

Authentication

x-api-keystring
Account authentication key.
OR
AuthorizationBearer

OAuth 2.0 access token issued by POST /api/oauth/token (client-credentials). Takes precedence over x-api-key when both are sent. See the Authentication section.

Request

This endpoint expects an object.
namestringRequired<=512 characters

Unique template name (snake_case, lowercase only).

categoryenumRequired
Allowed values:
parameter_formatenumRequired

Variable format. POSITIONAL uses {{1}}, {{2}}; NAMED uses {{name}}. The two formats cannot be mixed in a single template.

Allowed values:
languagestringRequired
componentslist of objectsRequired
Template components. Must include at least one BODY.
message_send_ttl_secondsintegerOptional1-604800

Message time-to-live, in seconds. Optional.

Response

Template created in PENDING status.
_idstringOptional
whatsapp_accountstringOptional
namestringOptional
categoryenumOptional
Allowed values:
languagestringOptional
statusenumOptional
Allowed values:
parameter_formatenumOptional

Variable format. POSITIONAL uses {{1}}, {{2}}; NAMED uses {{name}}. The two formats cannot be mixed in a single template.

Allowed values:
componentslist of objectsOptional

Errors

400
Bad Request Error
409
Conflict Error