---
title: "Publish a Markdown document (alias of POST /publish)"
method: POST
path: "/api/publish"
---

# Publish a Markdown document (alias of POST /publish)

`POST /api/publish`

## Request

- Base URL: `https://lucid.page`
- URL: `https://lucid.page/api/publish`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `apiKey`
  - none

## Request body

- PublishRequest
  - `markdown` string, required: Max 1 MB
  - `title` string, nullable
  - `visibility` 'private' | 'unlisted' | 'public'
  - `ttl` integer: Lifetime in seconds; omit for no expiry
  - `name` string, nullable

## Response `201`

Published

- PublishResponse
  - `slug` string, required
  - `url` string, required
  - `visibility` 'private' | 'unlisted' | 'public', required
  - `expires_at` string, date-time, nullable, required
  - `claim_token` string: One-time ownership token, returned only for anonymous publishes. Claim the page into an account with POST /api/docs/{slug}/claim.

---

[API](https://skmtc.dev/lucid/apis/lucid-page.md) · [All operations](https://skmtc.dev/lucid/apis/lucid-page/llms.txt) · [OpenAPI document](https://skmtc.dev/lucid/apis/lucid-page/revisions/ac6b8c27c38b?raw)
