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
| Parameter | Type | Required | Description |
|---|---|---|---|
website_id | UUID | Yes | Website to read (websiteId also accepted) |
canonical_url | string | No | Page 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
| Status | Cause |
|---|---|
400 | Missing website_id or an invalid canonical_url |
401 | Missing or invalid API key |
403 | API key lacks content_read or has no organization |
404 | No published page at that URL |