Edit an email template
Overview
Change a template's subject, body, or settings.
Use this to refine a template. Campaigns using it pick up the change on their next send.
You'll need the template id, the subject, the HTML and the editor data (json_content). Every call replaces these, and it also replaces manager_email and other_manager_email: leave those out and they're cleared. title and template_editor_mode keep their current values when you leave them out.
Send channel_id to attach the template to a campaign channel. A regular template becomes the channel's email; a follow_up template becomes its follow-up, with follow_up_interval and follow_up_interval_count (3 and 2 when left out). Get the channel id from data.data.channels[].id in the step 2 or step 3 response of Create or edit a campaign.
Editing a shared (global) template doesn't change it. A copy is saved under your account with a new
id, and the copy is returned (and attached tochannel_id). If your account already has a template with that name, the call returns400: send a differenttitle.
Returns the updated template.
Prerequisites
- A bearer token. See Authentication.
- The template's id (
email_template_id), from List email templates. - Optional: a campaign channel id (
channel_id) to attach the template to.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/campaign/template/email/update
Authentication
Account token
email_template_idmust be one of your account's templates or a shared (global) template; otherwise422.channel_id, when sent, must be a channel of a campaign on a location inside your own account tree; otherwise422.
Rate limit
This endpoint has no rate limit.
Request parameters
None.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
email_template_id | integer | Yes | The template to edit (value in List email templates). Must be one of your account's templates or a shared template. |
subject | string | Yes | The email subject line, up to 255 characters. |
html_content | string | Yes, unless html_content_b64 is sent | The email's HTML. |
html_content_b64 | string | No | The HTML, base64-encoded. Send it instead of html_content when the HTML contains <script>, <iframe> or on*= attributes, which AWS WAF blocks in plain text. It is decoded into html_content before validation. |
json_content | string | Yes | The editor's design data, as a JSON string. "{}" is fine. |
title | string | No | A new name for the template. Must be unique among your account's templates and the shared templates. Leave it out to keep the current name. |
template_editor_mode | string | No | custom or html_editor. Leave it out to keep the current mode. |
channel_id | integer | No | A campaign channel to attach the template to. Must belong to a campaign on a location inside your account tree. |
manager_email | string | No | Manager email address. Must be a real address on a domain that receives mail (checked with an RFC + DNS lookup), so @example.com addresses are rejected. Replaced on every call; leave it out to clear it. |
other_manager_email | array of strings | No | More manager email addresses, each different and checked like manager_email. Replaced on every call; leave it out to clear the list. |
follow_up_interval | integer | No | Follow-up interval in days: 1, 2, 3, 4, 5, 6, 7, 14 or 30. Used only with channel_id on a follow_up template. Defaults to 3. |
follow_up_interval_count | integer | No | Number of follow-up emails: 1, 2 or 3. Used only with channel_id on a follow_up template. Defaults to 2. |
Request payload
{
"email_template_id": 9084,
"subject": "How was your visit?",
"html_content": "<html><body><h1>Welcome!</h1></body></html>",
"json_content": "{}",
"channel_id": 5393
}Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
message | string | Email Template has been updated successfully! |
data | object | The saved template. For a shared template, this is your account's new copy. |
data.id | integer | The template's id. Use it as email_template_id. |
data.company_id | integer or null | The account that owns the template. null for a shared (global) template. |
data.store_id | integer or null | The location the template is tied to, or null. |
data.name | string | The template's name. |
data.subject | string or null | The email subject line. |
data.html_content | string or null | The email's HTML. |
data.json_content | object or null | The editor's design data. |
data.template_editor_mode | string or null | The editor used to author the template: custom or html_editor. |
data.template_type | string | regular or follow_up. |
data.manager_email | string or null | Manager email address saved on the template. |
data.other_manager_email | array of strings or null | More manager email addresses saved on the template. |
data.created_at | string or null | When the template was created (ISO 8601). null on some shared templates. |
data.updated_at | string or null | When the template was last changed (ISO 8601). |
data.deleted_at | string or null | Always null here; deleted templates are not returned. |
Response payload
{
"data": {
"status": "success",
"message": "Email Template has been updated successfully!",
"data": {
"id": 9084,
"company_id": 5994,
"store_id": 3007,
"name": "Default Email Template",
"subject": "How was your visit?",
"html_content": "<html><body><h1>Welcome!</h1></body></html>",
"json_content": [],
"template_editor_mode": "custom",
"template_type": "regular",
"manager_email": null,
"other_manager_email": [],
"created_at": "2026-09-23T10:43:44.000000Z",
"updated_at": "2026-10-01T10:30:00.000000Z",
"deleted_at": null
}
}
}Examples
Success payload
See Response payload. html_content is shortened here.
Error payload
400 Name already used by your account
{
"message": "Bad Request",
"status": "error",
"errors": {
"title": "A template with this name already exists for your company. Please choose a different name for your template."
}
}422 Not your template
{
"message": "The selected email template does not belong to your company.",
"errors": {
"email_template_id": [
"The selected email template does not belong to your company."
]
}
}422 Channel outside your tree
{
"message": "The selected channel id does not belong to your company hierarchy.",
"errors": {
"channel_id": [
"The selected channel id does not belong to your company hierarchy."
]
}
}422 Name taken
{
"message": "The template name has already been taken.",
"errors": {
"title": [
"The template name has already been taken."
]
}
}422 Required fields missing
{
"message": "The email template id field is required. (and 3 more errors)",
"errors": {
"email_template_id": [
"The email template id field is required."
],
"subject": [
"The subject field is required."
],
"html_content": [
"The html content field is required."
],
"json_content": [
"The json content field is required."
]
}
}| Status | Meaning |
|---|---|
200 | The template was saved (for a shared template, as a new copy under your account). |
400 | You edited a shared template and your account already has a template with that name. |
401 | The token is missing, expired or invalid. |
422 | A required field is missing or invalid, the template or channel_id is outside your account, title is taken, or an email fails the RFC + DNS check. |
500 | Unexpected server error. |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/template/email/update" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"email_template_id": 9084, "subject": "How was your visit?", "html_content": "<html><body><h1>Welcome!</h1></body></html>", "json_content": "{}", "channel_id": 5393}'Updated 17 days ago
