Create landing page template
Overview
Create a new campaign landing-page template owned by the caller's account. template_editor_mode defaults to custom. Only title, company_id, store_id and template_editor_mode are persisted at create time; content is added via the update endpoint.
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/landing-page/create
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
bearer token, account role — authentication. Stamped with
company_id = user.person.company_id.store_id, if supplied, must belong to the caller's hierarchy (an ownership check).
Rate limit
- No rate limit.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Required | Unique among the caller's account templates and global templates. |
html_content | string | Optional | HTML body. Optional when you send html_content_b64. Not persisted at create (set via update). |
html_content_b64 | string (base64) | Optional | Base64 of html_content for WAF-blocked bytes; decoded before validation. |
json_content | string (JSON) | Optional | Editor JSON, validated as json. |
template_editor_mode | string | Optional | custom or html_editor. Defaults to custom. |
store_id | integer | Optional | Scope to one store; must be in the caller's hierarchy. |
{
"title": "Summer Campaign Landing Page",
"html_content": "<html><body><h1>Welcome</h1></body></html>",
"json_content": "{}",
"template_editor_mode": "custom",
"store_id": "<storeId>"
}How it works
- Synchronous.
200 OKreturnsdata.data=only(id,title,description,store_id,enable_direct_to_customer,enable_direct_to_manager,enable_direct_to_owner,manager_email,other_manager_email)— unset fields serialise asnullon a fresh create.422on validation failure (e.g. duplicatetitle).
Response
200 OK · 200
200{
"data": {
"status": "success",
"message": "Landing Page has been created successfully!",
"data": {
"id": 1,
"title": "Summer Campaign Landing Page",
"description": null,
"store_id": 123,
"enable_direct_to_customer": null,
"enable_direct_to_manager": null,
"enable_direct_to_owner": null,
"manager_email": null,
"other_manager_email": null
}
}
}422 Duplicate title · 422
422{
"message": "The template name has already been taken.",
"errors": {
"title": [
"The template name has already been taken."
]
}
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
422 | Duplicate title |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/template/landing-page/create" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"title": "Summer Campaign Landing Page", "html_content": "<html><body><h1>Welcome</h1></body></html>", "json_content": "{}", "template_editor_mode": "custom", "store_id": "<storeId>"}'Updated 9 days ago
Did this page help you?
