---
title: "pages"
method: POST
path: "/api/pages"
tags: ["pages"]
---

# pages

`POST /api/pages`

Create a new custom page. Requires administrative privileges.

        ### Body Parameter Guidelines:
        - **title**: Heading displayed at the top of the page.
        - **slug**: URL path identifier. Must be unique and URL-safe.
        - **body_markdown**: Content written in Markdown format.
        - **body_json**: Optional JSON payload for API-consumed/structured data pages.
        - **is_top_level_path**: Set to `true` to serve the page directly at the root (e.g. `/{slug}`) instead of under the default namespace `/page/{slug}`. Use with caution to avoid namespace collisions with core Forem paths.
        - **template**: Layout styling options (`contained` or custom layouts).

## Request body

- object
  - `title` string — Title of the page
  - `slug` string — Used to link to this page in URLs, must be unique and URL-safe
  - `description` string — For internal use, helps similar pages from one another
  - `body_markdown` string — The text (in markdown) of the page (required)
  - `body_json` string — For JSON pages, the JSON body
  - `is_top_level_path` boolean — If true, the page is available at '/{slug}' instead of '/page/{slug}', use with caution
  - `template` 'contained' | 'full_within_layout' | 'nav_bar_included' | 'json' | 'css' | 'txt' — Controls what kind of layout the page is rendered in

## Response `200`

successful

## Other responses

- `401` — unauthorized
- `422` — unprocessable

## Changes

> 59 revisions in range; 8 could not be searched.

- **2026-07-13** (v1) `189b62b952ea` — 3 breaking
  - removed the media type `application/json` for the response with the status `200`
  - removed the media type `application/json` for the response with the status `401`
  - removed the media type `application/json` for the response with the status `422`
- **2026-07-13** (v1) `7db6ba099285` — 3 breaking
  - removed the media type `application/json` for the response with the status `200`
  - removed the media type `application/json` for the response with the status `401`
  - removed the media type `application/json` for the response with the status `422`
- **2026-05-28** (v1) `6550ad7be94f` — 3 info
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `422`
- **2026-03-03** (v1) `c9e7662755c2` — 3 breaking, 2 info
  - removed the media type `application/json` for the response with the status `200`
  - removed the media type `application/json` for the response with the status `401`
  - removed the media type `application/json` for the response with the status `422`
  - added the new `css` enum value to the request property `template`
  - …1 more
- …earlier changes not shown

[Full history](https://skmtc.dev/forem/apis/forem-api-v1/changes/api/pages/post.md)

---

[API](https://skmtc.dev/forem/apis/forem-api-v1.md) · [All operations](https://skmtc.dev/forem/apis/forem-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/forem/forem-api-v1/revisions/1f64f71fc2a7/schema)
