curl --request POST \
--url https://docurise.io/api/preview/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"kind": "notion",
"title": "Q3 Product Roadmap",
"description": "Priorities and timeline for the quarter",
"notionUrl": "https://www.notion.so/myworkspace/Q3-Roadmap-abc123def456"
}
'{
"id": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
"url": "https://docurise.io/acme/d/q3-product-roadmap"
}Create a document
Create a DocuRise document: a Notion page, a post (rich text or an HTML page) or a lead-capture form (a form holds at most 50 questions, at most 10 of them file uploads)
curl --request POST \
--url https://docurise.io/api/preview/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"kind": "notion",
"title": "Q3 Product Roadmap",
"description": "Priorities and timeline for the quarter",
"notionUrl": "https://www.notion.so/myworkspace/Q3-Roadmap-abc123def456"
}
'{
"id": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
"url": "https://docurise.io/acme/d/q3-product-roadmap"
}Authorizations
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
Body
- Notion page
- Post: content (rich text)
- Post: html (HTML page)
- Lead-capture form
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.
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).
live Response
Document created.
The document's public share URL: the owner's canonical address, https://docurise.io/{username}/d/{slug}.
A document keeps a legacy https://docurise.io/v/{slug} link when the canonical address is not
enabled for the owner's account or the owner has no usable username; that link still resolves. Live immediately, except for a post or form created
with status: draft, which is not publicly reachable until published.
