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

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

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
titlestringYesThe template's name. Must be unique among your account's templates and the shared (global) templates.
html_contentstringNoAccepted but not saved; set the page's HTML with Edit a landing page template.
html_content_b64stringNoBase64 of html_content, for HTML that AWS WAF blocks in plain text. Accepted but not saved, like html_content.
json_contentstringNoEditor 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_modestringNoThe editor used to author the template: custom or html_editor. Defaults to custom.
store_idintegerNoA 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.

FieldTypeDescription
statusstringsuccess.
messagestringLanding Page has been created successfully!
dataobjectThe new template.
data.idintegerThe new template's id. Use it as landing_page_id.
data.titlestringThe template's name.
data.descriptionstring or nullnull on a new template.
data.store_idinteger or nullThe location the template is tied to, or null.
data.enable_direct_to_customerboolean or nullDirect-to-customer option; null on a new template.
data.enable_direct_to_managerboolean or nullDirect-to-manager option; null on a new template.
data.enable_direct_to_ownerboolean or nullDirect-to-owner option; null on a new template.
data.manager_emailstring or nullnull on a new template.
data.other_manager_emailarray of strings or nullnull 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."
    ]
  }
}
StatusMeaning
200The template was created.
401The token is missing, expired or invalid.
422title 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.
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", "template_editor_mode": "custom", "store_id": 3007}'

Did this page help you?