Skip to main content

Update Template

Update a template's name or HTML body. Provide only the fields you want to change.

Endpoint

PATCH /templates/:id

Returns: 200 OK

Path Parameters

ParameterTypeDescription
idstringThe template ID

Body Parameters

ParameterTypeRequiredDescription
namestringNoNew template name. Max 255 characters.
htmlstringNoReplacement HTML body. Sanitized server-side.

Response

Returns the updated template — see Create Template for the shape.


Examples

curl -X PATCH "https://api.arsel.sa/v1/templates/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1>Welcome back, {{first_name}}!</h1>"
}'

Error Responses

{
"status_code": 404,
"name": "not_found",
"message": "Template not found"
}