Create or updates the company's content override for a template type. Region HTML arrives base64-encoded; null/empty regions inherit the system/white-label default. The endpoint validates variables in content against the type's allowed token set.
Auth: Both — authentication + an email-template feature check. company_id scoped by an ownership check; platform-owned types are forbidden (403) for non-platform companies. (Only the reachable companies differ per role.)
Rate limit: No rate limit.
Request
- Body (region fields are base64-encoded HTML;
ValidTemplateVariableschecks tokens against the type):
| Field | Type | Required | Notes |
|---|---|---|---|
| company_id | integer | Yes | Must be an existing account inside your own account tree. |
| type | string | Yes | Valid EmailTemplateType value. |
| header | string | No | nullable, base64 HTML, max:80000, token-validated. Empty falls back to inherit default. |
| body | string | No | nullable, base64 HTML, max:80000, token-validated. |
| footer | string | No | nullable, base64 HTML, max:80000, token-validated. |
| signature | string | No | nullable, base64 HTML, max:80000, token-validated. |
| subject_override | string | No | nullable, max:255, token-validated. Plain text (not base64). |
| template_mode | string | No | nullable, one of regions, html. |
| custom_html | string | No | nullable, base64 HTML, max:400000. Used in html mode; omitting it on a regions-mode save does NOT clear a stored full-HTML draft. |
Response — { data. } envelope. Unlike sibling endpoints there is no nested status/data object — the controller returns status + message directly inside the envelope.
data.status(string) —success.data.message(string) —Email template saved successfully.
Errors: 403 when the template type is platform-managed or the email-template section is disabled for your account.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
