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 to channel_id). If your account already has a template with that name, the call returns 400: send a different title.

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

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/campaign/template/email/update

Authentication

Account token

  • email_template_id must be one of your account's templates or a shared (global) template; otherwise 422.
  • channel_id, when sent, must be a channel of a campaign on a location inside your own account tree; otherwise 422.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
email_template_idintegerYesThe template to edit (value in List email templates). Must be one of your account's templates or a shared template.
subjectstringYesThe email subject line, up to 255 characters.
html_contentstringYes, unless html_content_b64 is sentThe email's HTML.
html_content_b64stringNoThe 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_contentstringYesThe editor's design data, as a JSON string. "{}" is fine.
titlestringNoA 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_modestringNocustom or html_editor. Leave it out to keep the current mode.
channel_idintegerNoA campaign channel to attach the template to. Must belong to a campaign on a location inside your account tree.
manager_emailstringNoManager 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_emailarray of stringsNoMore manager email addresses, each different and checked like manager_email. Replaced on every call; leave it out to clear the list.
follow_up_intervalintegerNoFollow-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_countintegerNoNumber 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.

FieldTypeDescription
statusstringsuccess.
messagestringEmail Template has been updated successfully!
dataobjectThe saved template. For a shared template, this is your account's new copy.
data.idintegerThe template's id. Use it as email_template_id.
data.company_idinteger or nullThe account that owns the template. null for a shared (global) template.
data.store_idinteger or nullThe location the template is tied to, or null.
data.namestringThe template's name.
data.subjectstring or nullThe email subject line.
data.html_contentstring or nullThe email's HTML.
data.json_contentobject or nullThe editor's design data.
data.template_editor_modestring or nullThe editor used to author the template: custom or html_editor.
data.template_typestringregular or follow_up.
data.manager_emailstring or nullManager email address saved on the template.
data.other_manager_emailarray of strings or nullMore manager email addresses saved on the template.
data.created_atstring or nullWhen the template was created (ISO 8601). null on some shared templates.
data.updated_atstring or nullWhen the template was last changed (ISO 8601).
data.deleted_atstring or nullAlways 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."
    ]
  }
}
StatusMeaning
200The template was saved (for a shared template, as a new copy under your account).
400You edited a shared template and your account already has a template with that name.
401The token is missing, expired or invalid.
422A 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.
500Unexpected 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}'

Did this page help you?