Skip to content

Edit message templates via API and SDK

Released: August 26, 2026

You can now edit an existing WhatsApp message template’s content programmatically — previously the public surface was create / list / get / sync only, and changing an approved template meant using the dashboard or Meta Business Manager.

The request body is components-only and works like Meta’s edit endpoint: send the full desired components array — Meta replaces all components at once, so this is a replacement, not a partial patch. name, language, and category cannot change. When a name has multiple languages, pass ?language= to pick which one to edit.

A successful edit puts the template back into Meta review, so the returned status is pending; poll GET /v1/{phone_number_id}/templates/{name} for the eventual approved / rejected transition.

Terminal window
curl -X PATCH "https://api.kirimdev.com/v1/106540352242922/templates/order_update?language=id" \
-H "Authorization: Bearer $KIRIM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"components": [
{
"type": "BODY",
"text": "Pesanan {{1}} sudah dikirim.",
"example": { "body_text": [["A123"]] }
}
]
}'

Only templates already reviewed by Meta (approved / rejected) can be edited — a template still pending review returns 409 template_not_editable (a ConflictError in the SDK). Meta also enforces edit rate limits: an approved template can be edited 10 times per 30 days or once per 24 hours (rejected templates are unlimited); hitting the cap surfaces as 429 / 400.

const template = await kirim
.phoneNumbers('106540352242922')
.templates.update(
'order_update',
{
components: [
{
type: 'BODY',
text: 'Pesanan {{1}} sudah dikirim.',
example: { body_text: [['A123']] },
},
],
},
{ language: 'id' },
)
console.log(template.status) // "pending"

Editing is intentionally not exposed on the MCP server: an edit mutates a production template and re-triggers Meta review, so it stays an explicit API/SDK action rather than something an autonomous agent can trigger (consistent with MCP already omitting template delete).