Update email template
Overview
Update an existing email template (subject, HTML/JSON content, name, editor mode, manager emails). Copy-on-write for globals: if the target template has no company_id (a global template), it copies into the caller's account first. A name clash there returns 400. When you supply channel_id the template is wired onto that campaign channel. A follow_up template sets the channel's follow_up_template_id + interval fields, otherwise it sets template_id.
Prerequisites
- A bearer token in the
Authorizationheader.
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
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
bearer token, account role — authentication.
email_template_idmust resolve to a template owned by the caller's account (or a global one); otherwise validation fails.
Rate limit
- No rate limit.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
email_template_id | integer | Required | Must be an existing email template inside your own account tree (or be global). |
subject | string | Required | Max 255. |
html_content | string | Required* | Rendered HTML. *Optional when you send html_content_b64. |
html_content_b64 | string (base64) | Optional | Base64 of html_content — use for payloads with <script>/<iframe>/on*= that AWS WAF blocks in clear. Decoded into html_content before validation. |
json_content | string (JSON) | Required | Editor JSON, validated as json. |
title | string | Optional | New name. Unique within the caller's account and against global (shared) templates (ignores this row). |
template_editor_mode | string | Optional | custom or html_editor. |
channel_id | integer | Optional | Must be an existing campaign channel. Associates the template with the channel. |
manager_email | string (email) | Optional | Validated email:rfc,dns. |
other_manager_email | string[] | Optional | Each a distinct email:rfc,dns. |
follow_up_interval | integer | Optional | One of 1,2,3,4,5,6,7,14,30. Applied to the channel for follow_up templates. |
follow_up_interval_count | integer | Optional | One of 1,2,3. |
{
"email_template_id": "<emailTemplateId>",
"subject": "Welcome to our service!",
"html_content": "<html><body><h1>Welcome!</h1></body></html>",
"json_content": "{}",
"title": "Updated Template Name",
"template_editor_mode": "custom",
"channel_id": "<channelId>",
"manager_email": "[email protected]",
"other_manager_email": [
"[email protected]"
]
}How it works
- Synchronous.
200 OKreturns the saved model underdata.data.400(envelope{message,status,errors}) when replicating a global template and the chosen name already exists for the company.422on validation failure or when the template is not in the caller's account.
Response
200 OK · 200
200{
"data": {
"status": "success",
"message": "Email Template has been updated successfully!",
"data": {
"id": 1,
"company_id": 30,
"store_id": 123,
"name": "Updated Template Name",
"subject": "Welcome to our service!",
"html_content": "<html><body><h1>Welcome!</h1></body></html>",
"json_content": {},
"template_editor_mode": "custom",
"template_type": "regular",
"manager_email": "[email protected]",
"other_manager_email": [
"[email protected]"
],
"created_at": "2026-07-09T10:30:00.000000Z",
"updated_at": "2026-07-09T10:30:00.000000Z",
"deleted_at": null
}
}
}422 Not your template · 422
422{
"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."
]
}
}Errors
| Status | Meaning |
|---|---|
400 | The request was rejected — the response explains why |
401 | The bearer token is missing, expired or invalid |
422 | Not your template |
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": "<emailTemplateId>", "subject": "Welcome to our service!", "html_content": "<html><body><h1>Welcome!</h1></body></html>", "json_content": "{}", "title": "Updated Template Name", "template_editor_mode": "custom", "channel_id": "<channelId>", "manager_email": "[email protected]", "other_manager_email": ["[email protected]"]}'Updated 11 days ago
