Skip to main content
POST
Create template
This is the single creation call. Its body is the JSON of the model you picked — there is no separate route per model, and sending the payload from Models already creates the template. What lives here is the mechanics and the return: the route, the wabaId, the schema field by field and what comes back in each case. The playground above fires the real call. The template starts as PENDING and becomes APPROVED or REJECTED after Meta’s review. Use Sync templates to force a status update.
The wabaId comes from the List WABAs endpoint.
The name goes in snake_case, with no spaces or special characters, and cannot be changed after creation.
This endpoint is scoped by WABA, so today it covers only Official WhatsApp.Instagram and Messenger also have a pre-approved template — the Utility Template, scoped by page. Support for them in Omni Z-API is being implemented. See the comparison of the three template kinds.

Choose the model

The 13 models and which to use

Template fields

What each field is for

Validation

What Meta rejects

Authorizations

Authorization
string
header
required

Secret Key generated in the Omni Z-API Security panel

Path Parameters

wabaId
string
required

WABA ID (obtained via List WABAs)

Example:

"428083093730937"

Body

application/json
name
string
required

Template name: lowercase letters, digits and underscore. It cannot be changed after creation.

Maximum string length: 512
Pattern: ^[a-z0-9_]+$
category
enum<string>
required

Several types have a fixed category. See "Template types".

Available options:
UTILITY,
MARKETING,
AUTHENTICATION
language
string
required

Language in Meta's format, such as pt_BR or en_US.

parameter_format
enum<string>

Variable syntax. Named is Meta's current format.

Available options:
NAMED,
POSITIONAL
message_send_ttl_seconds
integer

Delivery window in seconds. Range by category: authentication 30 to 900, marketing 43200 to 2592000, utility 30 to 43200. The value -1 is a shortcut for 30 days.

allow_category_change
boolean

Lets Meta recategorize the template during review.

library_template_name
string

Model name in Meta's template library. See "Template Library".

library_template_body_inputs
object[]

Body options the library model accepts.

library_template_button_inputs
object[]

Button data for the library model.

components
object[]

Each item is a component, identified by the type field. The fields below belong to a specific type, and what each template type accepts is in "Template types".

Response

Template created and submitted for approval

id
string

Created template ID

status
enum<string>

Initial status (usually PENDING)

Available options:
PENDING,
APPROVED,
REJECTED
category
enum<string>

Created template category

Available options:
UTILITY,
MARKETING,
AUTHENTICATION