Skip to content
Browse documentation

Getting started

Landing pages

Define a block layout once, then publish a separate URL for each entry. Your storefront renders the blocks. Webtools stores the content, SEO, and theme colors.

Type, blocks, entries

The type is the layout: name, slug, SEO, theme colors, and an ordered list of blocks. Each entry is one public URL under that type. It has its own name, slug, excerpt, SEO, color overrides, and a value for each block key.

BlockEntry value
heading{ text, level } with level 1, 2, or 3
text{ text }
rich_text{ html }
image{ media_asset_id, alt?, caption? }
gallery{ items: [{ media_asset_id }] }
list{ items: [{ text, description? }] }
cta{ label, url }
quote{ text, attribution? }
select{ value } from config.choices
multi_select{ values } from config.choices
entry_reference{ entry_id } or { entry_ids } when config.multiple is true

SEO and theme

Types and entries both store seo_title, seo_description, canonical_url, and an Open Graph image. Public entry responses include theme from the type and theme_overrides from the entry. Apply the overrides on top. Allowed colors are background, foreground, accent, and muted, as #RGB or #RRGGBB.

Publishing an entry notifies IndexNow for /{page_slug}/{entry_slug}, /{page_slug}, and /sitemap.xml. Change the entry path with settings.seo.url_templates.landing_page.

Public paths

  • GET /api/v1/storefront/projects/{project_slug}/landing-pages
  • GET …/landing-pages/{page_slug}
  • GET …/landing-pages/{page_slug}/entries
  • GET …/landing-pages/{page_slug}/entries/{entry_slug}

Only published types and entries are returned. Drafts are 404.

Create with a secret key

Scope storefront.write.landing_pages. The same body works on the admin API. Address later updates by slug.

Create a type
curl -X POST "$API/api/v1/storefront/projects/$PROJECT_SLUG/landing-pages" \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "App services",
  "slug": "app-services",
  "theme": { "background": "#0B1F33", "accent": "#FA7414" },
  "blocks": [
    { "key": "title", "label": "Title", "block_type": "heading", "required": true },
    {
      "key": "industry",
      "label": "Industry",
      "block_type": "select",
      "config": { "choices": [{ "value": "logistics", "label": "Logistics" }] }
    }
  ]
}'

Then add an entry:

Create an entry
curl -X POST "$API/api/v1/storefront/projects/$PROJECT_SLUG/landing-pages/app-services/entries" \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Logistics",
  "slug": "logistics",
  "seo_title": "Logistics apps",
  "canonical_url": "https://example.com/app-services/logistics",
  "theme": { "accent": "#1D4ED8" },
  "blocks": {
    "title": { "text": "Logistics", "level": 1 },
    "industry": { "value": "logistics" }
  }
}'