Create a landing page template
Overview
Create a new landing page design.
Use this to set up how a campaign's landing page looks and what it asks.
You'll need a name (title). The page's content and options aren't saved here: add them with Edit a landing page 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/landing-page/create
Authentication
Account token
- The template is saved under the account of the user behind the token.
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 |
|---|---|---|---|
title | string | Yes | The template's name. Must be unique among your account's templates and the shared (global) templates. |
html_content | string | No | Accepted but not saved; set the page's HTML with Edit a landing page template. |
html_content_b64 | string | No | Base64 of html_content, for HTML that AWS WAF blocks in plain text. Accepted but not saved, like html_content. |
json_content | string | No | Editor data as a JSON string; must be valid JSON when sent. Accepted but not saved; set it with Edit a landing page template. |
template_editor_mode | string | No | The editor used to author the template: custom or html_editor. Defaults to custom. |
store_id | integer | No | A location to tie the template to. Must be inside your account tree. |
Request payload
{
"title": "Summer Campaign Landing Page",
"template_editor_mode": "custom",
"store_id": 3007
}Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
message | string | Landing Page has been created successfully! |
data | object | The new template. |
data.id | integer | The new template's id. Use it as landing_page_id. |
data.title | string | The template's name. |
data.description | string or null | null on a new template. |
data.store_id | integer or null | The location the template is tied to, or null. |
data.enable_direct_to_customer | boolean or null | Direct-to-customer option; null on a new template. |
data.enable_direct_to_manager | boolean or null | Direct-to-manager option; null on a new template. |
data.enable_direct_to_owner | boolean or null | Direct-to-owner option; null on a new template. |
data.manager_email | string or null | null on a new template. |
data.other_manager_email | array of strings or null | null on a new template. |
Response payload
{
"data": {
"status": "success",
"message": "Landing Page has been created successfully!",
"data": {
"id": 4549,
"title": "Summer Campaign Landing Page",
"description": null,
"store_id": 3007,
"enable_direct_to_customer": null,
"enable_direct_to_manager": null,
"enable_direct_to_owner": null,
"manager_email": null,
"other_manager_email": null
}
}
}Examples
Success payload
See Response payload.
Error payload
422 Duplicate title
{
"message": "The template name has already been taken.",
"errors": {
"title": [
"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 Title missing
{
"message": "The title field is required.",
"errors": {
"title": [
"The title field is required."
]
}
}| Status | Meaning |
|---|---|
200 | The template was created. |
401 | The token is missing, expired or invalid. |
422 | title is missing or already taken, store_id is outside your tree, json_content isn't valid JSON, or 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/landing-page/create" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"title": "Summer Campaign Landing Page", "template_editor_mode": "custom", "store_id": 3007}'Updated 17 days ago
Did this page help you?
