Skip to content

Create and submit a template for approval

POST /api/templates/submit

Submits a WhatsApp template to Meta for review. Approval is asynchronous: the final status arrives by webhook at /chat/updateTemplateStatus. Requires the templates:manage scope.

FieldTypeDescription
channel_idstringrequiredchannel_id of the channel (nk_ prefix). Example: "nk_dvzobn7m4h4y".
template_dataobjectrequiredTemplate definition in Meta’s format: { name, language, category, components }. Example: {"name":"bienvenida","language":"es","category":"MARKETING","components":[{"type":"BODY","text":"Hola {{1}}, bienvenido.","example":{"body_text":[["Juan"]]}}]}.
StatusDescriptionSchema
200—SubmitTemplateResponseDto
Terminal window
curl -X POST https://api.neike.dev/api/templates/submit \
-H "x-neike-api-key: whk_live_…" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "nk_dvzobn7m4h4y",
"template_data": {
"name": "bienvenida",
"language": "es",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, bienvenido.",
"example": {
"body_text": [
[
"Juan"
]
]
}
}
]
}
}'
FieldTypeDescription
externalCodenumberrequiredMeta code (200 = accepted for review). Example: 200.
statusPENDING · APPROVED · REJECTEDoptionalInitial status of the template. Example: "PENDING".
id_externalstringoptionalTemplate id in Meta. Example: "123456789".
namestringoptionalTemplate name. Example: "bienvenida".
categoryMARKETING · UTILITY · AUTHENTICATIONoptionalCategory under which Meta registered the template, if it returned one.
messagestringoptionalMeta error message, if externalCode != 200.