← All guides
Jul 8, 2026·5 min read

Publish a landing page with the REST API

Create and publish a landing page from a shell script with four authenticated curl calls to the PankoBlitz REST API.

Publish a PankoBlitz page with one curl chain

Every button in the PankoBlitz dashboard is a REST call, and the same endpoints back the MCP server. So you can create, name, and ship a landing page from a shell script with no browser and no SDK. Four requests take you from nothing to a live page.

To publish a landing page with the PankoBlitz REST API, send four authenticated requests to https://api.pankoblitz.com: GET /api/orgs to read your org id, POST /api/orgs/{orgId}/sites to create a draft, PUT /api/orgs/{orgId}/sites/{siteId}/subdomain to claim a name, and POST /api/orgs/{orgId}/sites/{siteId}/publish to go live. The page serves at <subdomain>.panko.page. Authenticate with an API key (prefix pk_) as a Bearer token.

Authenticate

Send an API key on every request as Authorization: Bearer pk_.... If you would rather not put a long-lived key in a script, mint a 30-day token with POST /auth/token and use that instead. Both go in the same header. Publishing and minting keys require a verified email, so confirm your account before you script anything.

Get your org id

Sites live under an org. Read yours first.

curl https://api.pankoblitz.com/api/orgs \
  -H "Authorization: Bearer pk_your_key"

Copy the id from the response. That is your YOUR_ORG_ID for the next three calls.

Create a draft site

Post the page definition. The body carries a slug, a title, a theme, a content object (a block map keyed by block id), and a block_order array that fixes the render order.

curl -X POST https://api.pankoblitz.com/api/orgs/YOUR_ORG_ID/sites \
  -H "Authorization: Bearer pk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "launch",
    "title": "My Launch Page",
    "theme": "glass",
    "content": {
      "hero:0": { "headline": "Ship faster", "subheadline": "One page, live today", "button_text": "Get started", "button_url": "/signup" },
      "cta:0": { "headline": "Ready to ship?", "subtext": "Free tier included", "button_text": "Sign up", "button_url": "/signup" }
    },
    "block_order": ["hero:0", "cta:0"]
  }'

The response returns the new site with a siteId. The site is a draft: it is not public yet, so nothing is reachable until you publish.

Set a subdomain

Claim the name the page will serve on.

curl -X PUT https://api.pankoblitz.com/api/orgs/YOUR_ORG_ID/sites/SITE_ID/subdomain \
  -H "Authorization: Bearer pk_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "subdomain": "mylaunch" }'

Publish

curl -X POST https://api.pankoblitz.com/api/orgs/YOUR_ORG_ID/sites/SITE_ID/publish \
  -H "Authorization: Bearer pk_your_key"

Your page is live at mylaunch.panko.page. To pull it back down, call POST .../unpublish on the same site. To remove it entirely, DELETE /api/orgs/{orgId}/sites/{siteId}.

Honest limits

  • A draft stays private until you publish. If you hit the subdomain before the publish call, you get nothing.
  • No verified email means no publish and no API key. This is not a warning you can skip.
  • The content map and block_order array must agree. A block id in block_order that is missing from content (or the reverse) will not render the way you expect, so keep the two in sync.
  • Custom domains are a separate step beyond this flow; these four calls only cover the panko.page subdomain.

Next step

Open the interactive docs to try each endpoint against your own account with request bodies pre-filled; the raw spec sits at /openapi.json if you want to generate a client. If you would rather have an agent drive this flow instead of curl, read the MCP tools reference, which wraps the same endpoints as callable tools.

Start building free