websites

Add Website Page

Changed on

Add a page at path with the given HTML.

An existing page at the path is 409 website_page_exists (use PUT .../pages/content to rewrite it). The new page is part of the DRAFT — it goes live on the next POST .../publish.

post/websites/{website_id}/pages

Request

  • Base URL
    https://api.moda.app/v1
  • URL
    https://api.moda.app/v1/websites/{website_id}/pages
  • Auth
    HTTP bearer

Path parameters

website_idstring uuid required

Headers

Moda-Version'2026-04-12' | '2026-05-01'
Example:2026-05-01

Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.

Request body

pathstring required

Page route path, e.g. '/' or '/pricing' (normalized: leading slash, no trailing slash; no whitespace).

htmlstring required

The new page's HTML.

namestring nullable

Display name for the page (derived from the path when omitted, e.g. '/pricing' → 'Pricing').

expected_versioninteger nullable

Optimistic-concurrency pin: when set, the operation is rejected with 409 website_version_conflict unless the site's current version matches. Read the version from any prior response on this surface.

idempotency_keystring nullable

A retried call with the same key replays the stored response (replayed:true) instead of failing on the already-created page.

Response

Successful Response

object required

Changes