Skip to main content

Edit Template

Replace a template's content and resubmit it to Meta. Use it to fix a rejected template or change an approved one.

The template returns to status: "pending" and rejection_reason is cleared. It cannot be sent until Meta approves it again. Name, language and category cannot be changed.

Endpoint​

PATCH /whatsapp/templates/:id

Returns: 200 OK

Headers​

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonYes

Path Parameters​

ParameterTypeDescription
idstringThe template ID

Body Parameters​

ParameterTypeRequiredDescription
componentsobject[]YesThe full replacement content, in the same format as Create Template.

What can be edited​

  • Only approved and rejected templates.
  • Not authentication templates, and not templates adopted from Meta's library: their wording belongs to Meta. Delete the template and create it again instead.
  • Meta limits edits of an approved template to one per 24 hours and ten per 30 days.

Response​

{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"name": "order_shipped",
"language": "en",
"category": "utility",
"status": "pending",
"rejection_reason": null,
"parameters": [
"first_name",
"order_id"
],
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Your order"
},
{
"type": "BODY",
"text": "Hi {{first_name}}, order {{order_id}} is on its way."
}
],
"created_at": "2026-03-08T12:00:00.000Z",
"updated_at": "2026-03-08T12:10:00.000Z"
}

See Get Template for the field reference.


Examples​

curl -X PATCH "https://api.arsel.sa/v1/whatsapp/templates/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer $ARSEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Your order"
},
{
"type": "BODY",
"text": "Hi {{first_name}}, order {{order_id}} is on its way."
}
]
}'

Error Responses​

{
"status_code": 400,
"name": "bad_request",
"message": "Only approved or rejected templates can be edited"
}