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