Create email template

Overview

Create a new campaign email template owned by the authenticated caller's account. subject defaults to an empty string, template_type to regular, and template_editor_mode to custom when you omit it. The endpoint returns the saved row in full.

Prerequisites

  • A bearer token in the Authorization header.

Base URL

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

Endpoint

POST /api/v1/campaign/template/email/create

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • bearer token, account role — authentication (no throttle group). The template records company_id = user.person.company_id. store_id, if supplied, must belong to the caller's account hierarchy (an ownership check).

Rate limit

  • No rate limit.

Request body

FieldTypeRequiredDescription
namestringRequiredMax 255. Must be unique among the caller's account templates and global (company_id NULL) templates.
subjectstringOptionalMax 255. Defaults to "".
store_idintegerOptionalScope the template to one store. Must be in the caller's account hierarchy (an ownership check).
template_typestringOptionalregular or follow_up. Defaults to regular.
template_editor_modestringOptionalcustom or html_editor. Defaults to custom.
{
  "name": "Welcome Email Template",
  "subject": "Welcome to our service!",
  "store_id": "<storeId>",
  "template_type": "regular"
}

How it works

  • Synchronous. 200 OK on success with the created model under data.data (note the double-data envelope). 422 when validation fails (e.g. duplicate name, store_id outside the caller's hierarchy).

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "Email Template has been created successfully!",
    "data": {
      "company_id": 30,
      "name": "Welcome Email Template",
      "subject": "Welcome to our service!",
      "store_id": 123,
      "template_type": "regular",
      "template_editor_mode": "custom",
      "updated_at": "2026-07-09T10:30:00.000000Z",
      "created_at": "2026-07-09T10:30:00.000000Z",
      "id": 1
    }
  }
}

422 Duplicate name · 422

{
  "message": "The template name has already been taken.",
  "errors": {
    "name": [
      "The template name has already been taken."
    ]
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
422Duplicate name
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": "<storeId>", "template_type": "regular"}'

Did this page help you?