---
title: "Create a new page"
method: POST
path: "/api/pages"
tags: ["Pages"]
---

# Create a new page

`POST /api/pages`

## Request body

- object
  - `key` string — Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.
  - `slug` string
  - `title` string, required
  - `description` string
  - `contentType` 'text/html' | 'application/json', required
  - `authMode` 'public' | 'authed' | 'password'
  - `password` string
  - `body` string, required
  - `needsCredentials` string[]

## Response `201`

Page created

- object
  - `id` string, required
  - `key` string, required — Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.
  - `version` 1, required
  - `api_url` string, required
  - `app_url` string, required

## Other responses

- `400` — Invalid body
- `409` — Slug already exists for this agent

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/ef761849166b/schema)
