Update a template
Modifies an existing template. Only the provided fields are changed.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Only provided fields are changed - an omitted field leaves the existing value unchanged. Supplying both html and mjml in the same request is rejected, as is an update that would leave the template with no html or text content. Supply version to make the update conditional - without it, the last write wins.
Renames the template. Cannot be cleared. Maximum 64 characters.
Cannot be cleared. Maximum 256 characters.
Replaces the html, and clears any stored mjml (switching the template back to plain HTML authoring). Set to null to remove the html - blank values are rejected. Maximum 500,000 characters.
Replaces the mjml source, recompiling the html from it. Set to null to remove the mjml source while keeping the html already compiled from it - blank values are rejected. Maximum 500,000 characters, and the compiled html must also be within the html limit.
Replaces the plain text content. Set to null to remove it - blank values are rejected. Maximum 100,000 characters.
Replaces the channels the template is scoped to. Set to null or an empty array to remove channel scoping, making the template available to every channel in the account.
The version of the template the update was based on, as returned by a previous read. If the template has since been modified the update is rejected with 409 Conflict, so concurrent edits aren't silently overwritten.
Response
OK
Opaque version, changing on every update. Pass it back as the version of an update to have the update rejected if the template has been modified in the meantime.