Skip to main content
POST

Authorizations

Authorization
string
header
required

A key generated from Settings → Developers, sent as Authorization: Bearer dr_live_<12 hex chars>_<64 hex chars>. Keys carry explicit scopes — each endpoint states the one it requires. The full key is shown exactly once at generation time and cannot be retrieved again; only the keyId prefix is shown afterward. A revoked key fails auth on its very next request.

Headers

Idempotency-Key
string
required

A unique client-generated string (≤ 255 characters) identifying this create attempt. See "Idempotency" above.

Maximum string length: 255

Body

application/json

The body of POST /api/preview/documents. kind selects which of the three bodies applies: notion, post or form. A missing or unknown kind, or a field that belongs to another kind, is a 400 VALIDATION_ERROR. A post body takes exactly one of content (rich-text HTML) or html (an HTML page): sending both or neither is a 400 VALIDATION_ERROR.

kind
enum<string>
required

Selects the document kind. Always notion for this body.

Available options:
notion
title
string
required

Document title, shown on the share page.

Required string length: 1 - 200
notionUrl
string<uri>
required

A URL to a Notion page that has been published to web (shared publicly). DocuRise fetches it unauthenticated — there is no per-account Notion connection to configure.

description
string

Optional subtitle shown on the share page.

Maximum string length: 500
status
enum<string>
default:live

Only live (the default) is accepted. draft is 422 STATUS_NOT_SUPPORTED because a Notion document has no draft state, and inactive is 422 STATUS_NOT_SUPPORTED because creating a document turned off is not available yet (create it, then PATCH its status to inactive).

Available options:
live

Response

Document created.

id
string
required

Opaque identifier for the created document — see "Identifiers" above.

url
string<uri>
required

The document's public share URL. Live immediately, except for a post or form created with status: draft, which is not publicly reachable until published.