curl --request POST \
--url https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_update_v1",
"category": "UTILITY",
"language": "en_US",
"components": [
{
"type": "BODY",
"text": "Hello {{1}}, your order {{2}} has been updated to {{3}}, see you soon.",
"example": {
"body_text": [
[
"Ana",
"ORD-1024",
"in transit"
]
]
}
}
]
}
'{
"id": "1613165359891625",
"status": "PENDING",
"category": "UTILITY"
}{
"error": "Newport request failed",
"value": {
"errors": [
{
"description": "",
"name": "META_WHATSAPP_ERROR",
"message": "Your message could not be sent because it contains content that other people on Facebook have reported as abusive.",
"code": "368"
}
]
}
}{
"error": 401,
"message": "Unauthorized"
}{
"error": {
"errors": [
{
"code": "100",
"name": "META_WHATSAPP_ERROR",
"subCode": "2388024",
"message": "Invalid parameter",
"description": "There is already English (US) content for this template. You can create a new template and try again."
}
]
}
}Templates (WhatsApp)
Create template
Create a new template and submit for Meta approval
POST
/
whatsapp
/
businesses
/
{wabaId}
/
templates
curl --request POST \
--url https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_update_v1",
"category": "UTILITY",
"language": "en_US",
"components": [
{
"type": "BODY",
"text": "Hello {{1}}, your order {{2}} has been updated to {{3}}, see you soon.",
"example": {
"body_text": [
[
"Ana",
"ORD-1024",
"in transit"
]
]
}
}
]
}
'{
"id": "1613165359891625",
"status": "PENDING",
"category": "UTILITY"
}{
"error": "Newport request failed",
"value": {
"errors": [
{
"description": "",
"name": "META_WHATSAPP_ERROR",
"message": "Your message could not be sent because it contains content that other people on Facebook have reported as abusive.",
"code": "368"
}
]
}
}{
"error": 401,
"message": "Unauthorized"
}{
"error": {
"errors": [
{
"code": "100",
"name": "META_WHATSAPP_ERROR",
"subCode": "2388024",
"message": "Invalid parameter",
"description": "There is already English (US) content for this template. You can create a new template and try again."
}
]
}
}Overview
This endpoint is WABA-scoped, so today it covers WhatsApp Official only.Instagram and Messenger also have pre-approved templates — the Utility Template, page-scoped. Support for them in Omni Z-API is being implemented. See the comparison of the three template types.
PENDING status and is updated to APPROVED or REJECTED after review.
Use the Sync templates endpoint to force a status update.
The template name must be in
snake_case, with no spaces or special characters. Once created, the name cannot be changed.The
wabaId is obtained from the List WABAs endpoint.Authorizations
Secret Key generated in the Omni Z-API Security panel
Path Parameters
WABA ID (obtained via List WABAs)
Example:
"428083093730937"
Body
application/json