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

# pages

`POST /api/pages`

This endpoint allows the client to create a new page.

## 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 ad (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

- **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
- **2023-12-18** (v1) `1c81594090c0` — 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`
- …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/7db6ba099285/schema)
