get-published-page

Render a published page, or list every published route

Returns the live, published version of a page, ready to render through your block registry. Without canonical_url it lists every published route of the website instead, which is useful for sitemaps and static generation.

Reads only the current immutable publication snapshot. Field expressions (CEL) and image URLs are resolved on every read.

Authentication

An API key in the x-api-key header (the query-parameter form is not accepted here). Keys with scoped permissions need content_read.

Query parameters

ParameterTypeRequiredDescription
website_idUUIDYesWebsite to read (websiteId also accepted)
canonical_urlstringNoPage path, e.g. /blog/hello-world. Omit to list routes

Response 200 OK β€” single page

{
  "mode": "published",
  "template_id": "…",
  "page_id": "…",
  "canonical_url": "/blog/hello-world",
  "publication_id": "…",
  "sequence": 4,
  "document_hash": "…",
  "route_params": {
    "slug": { "value": "hello-world", "schemaName": "post", "document": { } }
  },
  "blocks": [
    {
      "id": "…",
      "placement_key": "hero-1",
      "type": "hero",
      "block_type_key": "hero",
      "content": { "title": "Hello world" },
      "layout": null,
      "cel_fields": ["title"],
      "provenance": { }
    }
  ]
}

Response 200 OK β€” route list

{
  "pages": [
    { "canonical_url": "/", "template_id": "…", "publication_id": "…" }
  ]
}

Example

curl "$MEDIAN_API_URL/published_page?website_id=$WEBSITE_ID&canonical_url=/blog/hello-world" \
  -H "x-api-key: $MEDIAN_API_KEY"

Errors

StatusCause
400Missing website_id or an invalid canonical_url
401Missing or invalid API key
403API key lacks content_read or has no organization
404No published page at that URL