Templates
Restore a template version
Bring back an older version of a stored template as a new version.
POST
/v1/templates/{name}/restoreAPI keyCopies the subject, HTML, text and variables of an older version into a new version. History is never rewritten: restoring version 2 of a template that is at version 5 creates version 6 with the content of version 2. Sends use it straight away.
Like Update a template, this fails with 409 template_conflict if the template changes while the restore runs.
Path parameters
The template name.
Body parameters
The version to restore, a whole number from 1. See List template versions.
Response
The template at its new version. Same fields as Retrieve a template.
Errors
| Status | Code | When |
|---|---|---|
| 400 | missing_body | The request has no body. |
| 400 | invalid_body | version is missing or not a whole number of at least 1. |
| 404 | template_not_found | No stored template with this name. Built-in templates also return this. |
| 404 | template_version_not_found | The template has no such version. |
| 409 | template_conflict | The template changed while the restore ran. |