curl --request POST \
--url https://api.hubmessage.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
Create template
Create a new template and submit for Meta approval
POST
/
whatsapp
/
businesses
/
{wabaId}
/
templates
curl --request POST \
--url https://api.hubmessage.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
Creates a new message template and submits it for Meta approval. The template starts withPENDING 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
Body
application/json