> ## Documentation Index
> Fetch the complete documentation index at: https://docurise.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create your first document via the DocuRise API

> [!NOTE]
>
> The API is available to some accounts only. If your key generation is disabled, or the API answers
> `404`, check with your DocuRise contact.

## 1. Generate an API key

In the dashboard, go to **Settings → Developers**, name your key, select the
scopes it needs (`documents:write` for this guide), and generate it. Copy the
key immediately — it's shown in full exactly once.

## 2. Create a document

```bash theme={null}
curl -X POST https://docurise.io/api/preview/documents \
  -H "Authorization: Bearer dr_live_<keyId>_<secret>" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "notion",
    "title": "Q3 Product Roadmap",
    "notionUrl": "https://www.notion.so/myworkspace/Q3-Roadmap-abc123def456"
  }'
```

The Notion page must already be published to web (shared publicly) —
DocuRise fetches it unauthenticated, there's no separate Notion connection
step.

`Idempotency-Key` is required on every create request. Reusing the same key
with the same body replays the original response instead of creating a
second document — safe to retry on a timeout.

### Not writing code? Setting this up in Zapier, n8n, or a similar tool

The `Idempotency-Key` exists so that a retry — yours, or the automation
tool's own automatic retry after a timeout — doesn't create a second
document. It only works if you set it up right:

> [!TIP]
>
> **Do:** set it to something that's always the same for this one document, and different for every
> other document — usually the unique ID of whatever triggered the automation (a Notion page ID, a
> form submission ID, a spreadsheet row ID).

> [!WARNING]
>
> **Don't** use a "generate random ID" step. A key that's different on every attempt gives you zero
> protection — it looks like it's handling retries safely, but a retry with a fresh random key just
> creates a duplicate document anyway.

**Zapier**

In your action step (e.g. "Webhooks by Zapier" → Custom Request, or a
custom app's Create action), map the `Idempotency-Key` field directly to
a unique field from your trigger step — don't generate it with a
Formatter "random" utility. If your trigger is a new Notion page, for
example, map it to that page's ID:
`create-doc-{{Trigger: Page ID}}`.

**n8n**

In the HTTP Request node's headers, set `Idempotency-Key` with an
expression that references data from an earlier node — not a
Crypto/random-ID node. For example:
`create-doc-{{ $json.pageId }}`.

## 3. Read the response

A successful call returns `201` with the document's id and live share URL:

```json theme={null}
{
  "id": "clx1y2z3a4b5c6d7e8f9g0h1",
  "url": "https://docurise.io/v/q3-product-roadmap"
}
```

API errors share one JSON shape — see [Errors](https://docurise.io/docs/errors.md) for every
error code, whether to retry, and what to do about it.

## Next steps

* [Authentication](https://docurise.io/docs/authentication.md) — scopes, key rotation, and revocation.
* [Create a document reference](https://docurise.io/docs/api-reference/create-document.md) — full
  request/response contract.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.