Create an email template
Overview
Create a new email template.
Use this to set up a campaign's email.
You'll need a name. The subject is optional, and the body isn't set here: add it with Edit an email template.
Returns the template with its id.
Prerequisites
- A bearer token. See Authentication.
- Optional: a location id (
store_id) to tie the template to one location.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/campaign/template/email/create
Authentication
Account token
- The template is saved under the account of the user behind the token (
company_idin the response). store_id, when sent, must be 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 |
|---|---|---|---|
name | string | Yes | The template's name, up to 255 characters. Must be unique among your account's templates and the shared (global) templates. |
subject | string | No | The email subject line, up to 255 characters. Defaults to an empty string. |
store_id | integer | No | A location to tie the template to. Must be inside your account tree. |
template_type | string | No | regular or follow_up. Defaults to regular. A follow_up template becomes a campaign's follow-up email when you attach it to a channel. |
template_editor_mode | string | No | The editor used to author the template: custom or html_editor. Defaults to custom. |
Request payload
{
"name": "Welcome Email Template",
"subject": "Welcome to our service!",
"store_id": 3007,
"template_type": "regular"
}Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
message | string | Email Template has been created successfully! |
data | object | The new template. |
data.company_id | integer | The account that owns the template (the account of the user behind the token). |
data.name | string | The template's name. |
data.subject | string | The subject line, or an empty string. |
data.store_id | integer or null | The location the template is tied to, or null. |
data.template_type | string | regular or follow_up. |
data.template_editor_mode | string | custom or html_editor. |
data.updated_at | string | When the template was last changed (ISO 8601). |
data.created_at | string | When the template was created (ISO 8601). |
data.id | integer | The new template's id. Use it as email_template_id. |
Response payload
{
"data": {
"status": "success",
"message": "Email Template has been created successfully!",
"data": {
"company_id": 5994,
"name": "Welcome Email Template",
"subject": "Welcome to our service!",
"store_id": 3007,
"template_type": "regular",
"template_editor_mode": "custom",
"updated_at": "2026-10-01T10:30:00.000000Z",
"created_at": "2026-10-01T10:30:00.000000Z",
"id": 9085
}
}
}Examples
Success payload
See Response payload.
Error payload
422 Duplicate name
{
"message": "The template name has already been taken.",
"errors": {
"name": [
"The template name has already been taken."
]
}
}422 Location outside your tree
{
"message": "The selected store id does not belong to your company hierarchy.",
"errors": {
"store_id": [
"The selected store id does not belong to your company hierarchy."
]
}
}422 Name missing
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}| Status | Meaning |
|---|---|
200 | The template was created. |
401 | The token is missing, expired or invalid. |
422 | name is missing or already taken, store_id is outside your tree, or template_type / template_editor_mode has an invalid value. |
500 | Unexpected server error. |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/template/email/create" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name": "Welcome Email Template", "subject": "Welcome to our service!", "store_id": 3007, "template_type": "regular"}'Updated 17 days ago
Did this page help you?
