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

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://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_id in the response).
  • store_id, when sent, must be a location inside your own account tree; otherwise 422.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
namestringYesThe template's name, up to 255 characters. Must be unique among your account's templates and the shared (global) templates.
subjectstringNoThe email subject line, up to 255 characters. Defaults to an empty string.
store_idintegerNoA location to tie the template to. Must be inside your account tree.
template_typestringNoregular 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_modestringNoThe 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.

FieldTypeDescription
statusstringsuccess.
messagestringEmail Template has been created successfully!
dataobjectThe new template.
data.company_idintegerThe account that owns the template (the account of the user behind the token).
data.namestringThe template's name.
data.subjectstringThe subject line, or an empty string.
data.store_idinteger or nullThe location the template is tied to, or null.
data.template_typestringregular or follow_up.
data.template_editor_modestringcustom or html_editor.
data.updated_atstringWhen the template was last changed (ISO 8601).
data.created_atstringWhen the template was created (ISO 8601).
data.idintegerThe 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."
    ]
  }
}
StatusMeaning
200The template was created.
401The token is missing, expired or invalid.
422name is missing or already taken, store_id is outside your tree, or template_type / template_editor_mode has an invalid value.
500Unexpected 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"}'

Did this page help you?