---
title: "Preview an article"
method: POST
path: "/api/articles/preview"
tags: ["articles"]
---

# Preview an article

`POST /api/articles/preview`

## Request

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

This endpoint allows the client to preview an article's rendered HTML and parsed front matter without saving it to the database.

## Request body

- Article: Representation of an Article to be created/updated
  - `article` object
    - `title` string
    - `body_markdown` string
    - `published` boolean
    - `series` string, nullable
    - `main_image` string, nullable
    - `canonical_url` string, nullable
    - `description` string
    - `tags` string[]: Up to 4 tags, as an array of strings
    - `organization_id` integer, nullable
    - `ai_disclosure_level` 'not_disclosed' | 'no_ai' | 'some_ai' | 'fully_autonomous': Level of AI tooling usage disclosure

## Response `200`

Rendered Article Preview

- object
  - `processed_html` string
  - `body_html` string
  - `title` string, nullable
  - `description` string, nullable
  - `tags` string[], nullable
  - `cover_image` string, nullable
  - `reading_time_minutes` integer
  - `ai_disclosure_level` string, nullable

## Other responses

- `401`: Unauthorized
- `422`: Unprocessable Entity

## Changes

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

[Operation history](https://skmtc.dev/forem/apis/forem-api-v1/changes/api/articles/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)
