> ## Documentation Index
> Fetch the complete documentation index at: https://00doc-web.vercel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API (v1)

> Optional HTTP API for publish, list, and document CRUD — same workspace as MCP.

# REST API (v1)

Most teams publish through the [dashboard](https://unfurl.pub/dashboard) or [MCP tools](/api-reference). The REST API is available when you need scripts, CI, or a non-MCP integration.

<Info>
  **Base URL:** `https://unfurl.pub`\
  **Auth:** Create a key at [Dashboard → API keys](https://unfurl.pub/dashboard/api-keys), then send `X-Api-Key: oodoc_…` or `Authorization: Bearer oodoc_…` on every request.
</Info>

## Endpoints

| Method   | Path                    | Purpose                                                                                 |
| -------- | ----------------------- | --------------------------------------------------------------------------------------- |
| `POST`   | `/api/v1/publish`       | Publish HTML (create or new version). Returns `document_id`, `version_id`, `share_url`. |
| `GET`    | `/api/v1/documents`     | List documents in the workspace.                                                        |
| `GET`    | `/api/v1/documents/:id` | Document metadata + versions. Query `?include_html=true` for full HTML.                 |
| `PATCH`  | `/api/v1/documents/:id` | Update `title` and/or `description` only.                                               |
| `DELETE` | `/api/v1/documents/:id` | Delete document permanently (`204`).                                                    |

MCP tools map to these routes: [`publish_document`](/api-reference/publish-document), [`get_document`](/api-reference/get-document), [`update_document`](/api-reference/update-document), [`delete_document`](/api-reference/delete-document).

## Publish body (`POST /api/v1/publish`)

| Field         | Type   | Required | Description                              |
| ------------- | ------ | -------- | ---------------------------------------- |
| `title`       | string | Yes      | 1–500 characters                         |
| `html`        | string | Yes      | Full HTML, up to 5,000,000 characters    |
| `document_id` | uuid   | No       | Append a version to an existing document |
| `note`        | string | No       | Version note, up to 2000 characters      |

**Success (200):**

```json theme={null}
{
  "document_id": "…",
  "version_id": "…",
  "share_url": "https://unfurl.pub/d/…"
}
```

## Plan limits

Free workspaces are limited to **5 published documents** and **1 API key**. Pro removes those caps and unlocks password-protected links, in-dashboard editing, and custom branding. See [pricing](https://unfurl.pub/#pricing).

<CardGroup cols={2}>
  <Card title="MCP overview" icon="plug" href="/core-concepts/mcp-overview" />

  <Card title="publish_document" icon="upload" href="/api-reference/publish-document" />
</CardGroup>
