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 Authorization header.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://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

FieldTypeRequiredDescription
titlestringRequiredUnique among the caller's account templates and global templates.
html_contentstringOptionalHTML body. Optional when you send html_content_b64. Not persisted at create (set via update).
html_content_b64string (base64)OptionalBase64 of html_content for WAF-blocked bytes; decoded before validation.
json_contentstring (JSON)OptionalEditor JSON, validated as json.
template_editor_modestringOptionalcustom or html_editor. Defaults to custom.
store_idintegerOptionalScope 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 OK returns data.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 as null on a fresh create. 422 on validation failure (e.g. duplicate title).

Response

200 OK · 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

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

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
422Duplicate title
500Unexpected 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>"}'

Did this page help you?