Skip to content

Edit template

POST /api/templates/edit

Edits an existing template of the channel’s WABA. It is identified by template_name (and language if there are several languages). Meta replaces the whole components array and the template goes back to review. Only APPROVED, REJECTED or PAUSED templates can be edited, and the category of an APPROVED one cannot be changed. Provide at least one of components, category or message_send_ttl_seconds. Errors come in externalCode and message. Requires the templates:manage scope.

FieldTypeDescription
channel_idstringrequiredchannel_id of the channel (nk_ prefix). Example: "nk_dvzobn7m4h4y".
template_namestringrequiredName of the template to edit. Example: "bienvenida".
languagestringoptionalTemplate language (Meta code, e.g. es_AR). Required if the name exists in several languages. Example: "es_AR".
template_idstringoptionalTemplate id in Meta. It is only used to confirm: it must match the template found by name in the channel’s WABA. Example: "123456789".
componentsobject[]optionalFull components array (replaces the current one).
categoryMARKETING · UTILITY · AUTHENTICATIONoptionalNew category. Meta does not allow changing it on APPROVED templates.
message_send_ttl_secondsnumberoptionalSend TTL in seconds (message_send_ttl_seconds). Example: 600.
StatusDescriptionSchema
200—EditTemplateResponseDto
Terminal window
curl -X POST https://api.neike.dev/api/templates/edit \
-H "x-neike-api-key: whk_live_…" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "nk_dvzobn7m4h4y",
"template_name": "bienvenida"
}'
FieldTypeDescription
externalCodenumberrequired200 = ok; 400, 404 or another Meta code on error. Example: 200.
successbooleanrequiredExample: true.
id_externalstringoptionalTemplate id in Meta. Example: "123456789".
namestringoptionalExample: "bienvenida".
languagestringoptionalExample: "es_AR".
statusstringoptionalStatus after the edit: it goes back to review. Example: "PENDING".
messagestringoptionalError message, if success is false.