Aveiro API
Authentication
Sites
List Sites
List Templates
Create Site
Pages
Create a Page
Delete a Page
List Pages
Reorder Pages
Update a Page
Audience
Newsletter API Overview
Newsletter Campaigns
Social
Social API Overview
Social Accounts
Social Media
Social Posts
TrademarkTrademark
Ctrl k
Search...
Sign up
Aveiro API
Authentication
Sites
List Sites
List Templates
Create Site
Pages
Create a Page
Delete a Page
List Pages
Reorder Pages
Update a Page
Audience
Newsletter API Overview
Newsletter Campaigns
Social
Social API Overview
Social Accounts
Social Media
Social Posts
TrademarkTrademark
AveiroBlogContact
© Aveiro. All rights reserved.
Built with Aveiro
Pages

Create a Page

POST /api/v1/sites/{siteId}/pages — create a new draft MDX page at a path.
Updated 7d ago
Delete a Page
In short
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
pathyesMDX path (for example /foo.mdx or /docs/bar.mdx). Normalized automatically.
contentnoMDX string. Defaults to a heading derived from the filename.
metadatanoPage metadata object (title, summary, tag, image, publishedAt, …)

Example (curl)

curl -s -X POST 'https://help.aveiro.app/api/v1/sites/SITE_ID/pages' \
  -H 'Authorization: Bearer av_live_…' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: create-overview-2026-07-08' \
  -d '{
    "path": "/guides/overview.mdx",
    "content": "# Overview\n\nDraft content here.",
    "metadata": { "title": "Overview" }
  }'

Response

201 Created
{
  "page": {
    "id": "new-content-uuid",
    "path": "/guides/overview.mdx",
    "title": "Overview",
    "dirty": true,
    "never_published": true,
    "updated_at": "2026-07-08T09:00:00.000000+00:00",
    "editor_url": "https://help.aveiro.app/en/ORG_ID/SITE_ID/edit?file=new-content-uuid",
    "content": "# Overview\n\nDraft content here.",
    "metadata": { "title": "Overview" },
    "revision": "version-uuid"
  }
}

Idempotency

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.

Errors

HTTP
Code
When
400VALIDATION_ERRORMissing path or invalid JSON
403FORBIDDENMissing content:write or page limit reached
404FOLDER_NOT_FOUNDParent folder does not exist
409ALREADY_EXISTSA page already exists at this path
409IDEMPOTENCY_CONFLICTSame key, different body
422INVALID_MDXContent failed MDX validation

Related

  • Update a page
  • Delete a page
  • List pages
{
  "error": {
    "code": "FOLDER_NOT_FOUND",
    "message": "Parent folder /docs/api does not exist. Create the folder in the editor first."
  }
}