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

# preview a page

`POST /api/pages/preview`

## Request

- Base URL: `https://dev.to`
- URL: `https://dev.to/api/pages/preview`
- Auth: one of:
  - API key in header `api-key`
  - HTTP bearer

Render a page's Markdown (including organization Liquid tags when `organization_id` is supplied) into HTML without saving it.

## Request body

- object
  - `body_markdown` string: The text (in markdown) of the page
  - `body_html` string, nullable: Raw HTML for site admin pages when body_markdown is omitted
  - `organization_id` integer, nullable: The ID of the organization the page belongs to, if previewing an organization page

## Response `200`

successful

- object
  - `processed_html` string

## Other responses

- `401`: unauthorized
- `422`: unprocessable

## Changes

- **2026-10-27** (v1) `12db4ecde9f3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/forem/apis/forem-api-v1/changes/api/pages/preview/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.dev/forem/apis/forem-api-v1/revisions/36f1cf80cf48?raw)
