Save (upsert) a template override
Overview
Create or update 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.
Prerequisites
- A bearer token. Callable with Partner and Account tokens.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/account/white-label/email-templates/save
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
Who can call it: Partner and Account tokens.
-
Authentication plus an email-template feature check.
-
company_idis 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
- Body (region fields are base64-encoded HTML;
ValidTemplateVariableschecks tokens against the type):
| Field | Type | Required | Description |
|---|---|---|---|
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. |
{
"company_id": 1,
"type": "user_welcome",
"body": "PHA+SGVsbG8gW3JlY2lwaWVudE5hbWVdPC9wPg==",
"subject_override": "Welcome to [partnerTitle]!",
"template_mode": "regions"
}Response
data.status(string) —success.data.message(string) —Email template saved successfully.
200 OK · 200
200{
"data": {
"status": "success",
"message": "Email template saved successfully."
}
}422 Validation Error · 422
422{
"message": "The body contains an unsupported variable. (and 1 more error)",
"errors": {
"body": [
"The body contains an unsupported variable: [storeName]."
],
"type": [
"The selected type is invalid."
]
}
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
403 | The template type is platform-managed, or the email-template section is disabled for your account |
422 | Validation Error |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/account/white-label/email-templates/save" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"company_id": 1, "type": "user_welcome", "body": "PHA+SGVsbG8gW3JlY2lwaWVudE5hbWVdPC9wPg==", "subject_override": "Welcome to [partnerTitle]!", "template_mode": "regions"}'Updated 10 days ago
Did this page help you?
