POST /api/v1/sites/{siteId}/pages creates a draft page at the given path. Send MDX content and optional metadata. Use Idempotency-Key to safely retry. Create parent collections via POST …/collections first.
Request
POST /api/v1/sites/{siteId}/pages
Authorization: Bearer av_live_…
Content-Type: application/json
Idempotency-Key: create-docs-overview-v1
{
"path": "/guides/overview.mdx",
"content": "# Overview\n\nWelcome to the guides.",
"metadata": {
"title": "Overview",
"summary": "Getting started with our API"
}
}
Required scope:content:write
Body fields
Field
Required
Description
path
yes
MDX path (for example /foo.mdx or /docs/bar.mdx). Normalized automatically.
content
no
MDX string. Defaults to a heading derived from the filename.
Pass Idempotency-Key on create requests so network retries do not create duplicate pages. Reusing the same key with a body returns .
different
409 IDEMPOTENCY_CONFLICT
Parent folders
The path’s parent folder must already exist. For /docs/api/foo.mdx, create the docs/api folder in the editor first. If the folder is missing, the API returns:
Root-level pages (for example /about.mdx) work without a parent folder.