---
title: "Add Website Page"
method: POST
path: "/websites/{website_id}/pages"
tags: ["websites"]
---

# Add Website Page

`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

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.

## Path parameters

- `website_id` string, uuid, required

## Headers

- `Moda-Version` '2026-04-12' | '2026-05-01'

## Request body

- WebsitePageAddRequest
  - `path` string, required: Page route path, e.g. '/' or '/pricing' (normalized: leading slash, no trailing slash; no whitespace).
  - `html` string, required: The new page's HTML.
  - `name` string, nullable: Display name for the page (derived from the path when omitted, e.g. '/pricing' → 'Pricing').
  - `expected_version` integer, 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_key` string, nullable: A retried call with the same key replays the stored response (replayed:true) instead of failing on the already-created page.

## Response `200`

Successful Response

- object

## Other responses

- `401`: Authentication required.
- `402`: Insufficient credits for a metered operation.
- `403`: Permission denied for this scope.
- `404`: Resource not found.
- `409`: Conflict (idempotency / resource state).
- `422`: Request validation failed.
- `429`: Rate limit exceeded.
- `500`: Internal error.

## Changes

- **2026-11-03** `9ac6a3abc0f8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/moda/apis/moda-public-api/changes/websites/:website_id/pages/post.md)

---

[API](https://skmtc.dev/moda/apis/moda-public-api.md) - [All operations](https://skmtc.dev/moda/apis/moda-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/moda/apis/moda-public-api/revisions/9ac6a3abc0f8?raw)
