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
Authorizationheader.
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
-
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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Max 255. Must be unique among the caller's account templates and global (company_id NULL) templates. |
subject | string | Optional | Max 255. Defaults to "". |
store_id | integer | Optional | Scope the template to one store. Must be in the caller's account hierarchy (an ownership check). |
template_type | string | Optional | regular or follow_up. Defaults to regular. |
template_editor_mode | string | Optional | custom 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 OKon success with the created model underdata.data(note the double-dataenvelope).422when validation fails (e.g. duplicatename,store_idoutside the caller's hierarchy).
Response
200 OK · 200
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
422{
"message": "The template name has already been taken.",
"errors": {
"name": [
"The template name has already been taken."
]
}
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
422 | Duplicate name |
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": "<storeId>", "template_type": "regular"}'Updated 9 days ago
Did this page help you?
