get-draft-page

Render the unpublished draft of a page for previews

Returns the current draft (authoring state) of a page, for preview environments. The response has the same shape as GET /published_page, with "mode": "draft". Field expressions (CEL) and image URLs are resolved on every read.

Authentication

An API key in the x-api-key header. Keys with scoped permissions need content_read.

Query parameters

ParameterTypeRequiredDescription
website_idUUIDYesWebsite to read (websiteId also accepted)
canonical_urlstringYesPage path, e.g. /blog/hello-world

Example

curl "$MEDIAN_API_URL/draft_page?website_id=$WEBSITE_ID&canonical_url=/pricing" \
  -H "x-api-key: $MEDIAN_API_KEY"

Errors

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