Update a stored template
Fully updates a stored template. name, content and language must be present in the body; leaving any one of them out fails the request.
Two omissions are not neutral here. is_active defaults to true, so leaving it out reactivates a deactivated record. sites, on the other hand, keeps the stored sites when it is omitted or sent as an empty array; a non-empty array replaces them completely.
The name must not be stored for the same language on any of the sites the record ends up bound to.
The change does not reach the storefront at once — the lookup is cached for a few minutes, as described under How a Stored Template Is Used.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The unique identifier of the stored template.
Request body for storing or fully updating a template. name, content and language are required on both operations.
is_active defaults to true when it is omitted, on a full update as well — leaving it out therefore reactivates a deactivated record. An omitted or empty sites binds a new record to the current site of the request, and leaves the stored sites untouched on a full update.
The path of the template to override, extension included. Surrounding whitespace and leading slashes are removed before the value is stored. The name is not checked against the templates that exist on disk, and must not already be stored for the same language on any of the sites the record is bound to.
emails/orders/completed.htmlThe template source. May not be empty, and is stored without being checked for syntax errors.
{% extends "emails/base.html" %} {% block content %}<h1>Your order is complete.</h1>{% endblock %}The language the record applies to. Must be one of the language codes configured for the deployment.
tr-trWhether the record is used when the template is rendered. Omitting it stores the record as active.
trueExample: trueIdentifiers of the sites the record applies to. Every identifier must belong to an existing site. A non-empty array replaces the stored sites completely; an omitted or empty array binds a new record to the current site and leaves an existing record's sites untouched.
[1]The updated stored template.
A stored template returned by the API. The full template source is part of the response, and deactivated records are returned in the same shape as active ones.
Unique identifier of the stored template.
The path of the template being overridden, as it was stored — without surrounding whitespace and without a leading slash.
emails/orders/completed.htmlThe template source, returned exactly as it was stored.
{% extends "emails/base.html" %} {% block content %}<h1>Your order is complete.</h1>{% endblock %}The language the record applies to, as one of the language codes configured for the deployment.
tr-trWhether the record is used when the template is rendered. false on a record that was deleted through this API.
trueIdentifiers of the sites the record is bound to. Empty on a record that is bound to no site, which is never rendered.
[1]When the record was created.
When the record was last modified.
The request contains invalid or missing data.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
No stored template exists with the given identifier. Deactivated records are still retrievable, so this answer means the record does not exist at all.
PUT /api/v1/remote/1/templates/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 201
{
"name": "emails/orders/completed.html",
"content": "{% extends \"emails/base.html\" %}\n{% block content %}<h1>Your order is complete.</h1>{% endblock %}",
"language": "tr-tr",
"is_active": true,
"sites": [
1
]
}{
"pk": 1,
"name": "emails/orders/completed.html",
"content": "{% extends \"emails/base.html\" %}\n{% block content %}<h1>Your order is complete.</h1>{% endblock %}",
"language": "tr-tr",
"is_active": true,
"sites": [
1
],
"created_date": "2026-01-01T00:00:00.000Z",
"modified_date": "2026-01-01T00:00:00.000Z"
}Last updated
Was this helpful?

