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

# Abacus Docs API

> REST + SSE on the same host as the app. Paths are /api/v2/….

This reference is generated from the published **OpenAPI 3.1** catalog for `/api/v2/`. The playground on each endpoint page is that operation. Nothing here invents a second host or a `/v1/documents/{id}/transcribe` job API — those are not in the spec.

## Base URL

Same origin as the web app:

```text theme={null}
https://abacusdocs.com
```

Every path already includes `/api/v2/`. Example: `GET https://abacusdocs.com/api/v2/me/`.

There is no `api.abacusdocs.com`.

## Who this API is for

`/api/v2/` is the surface the SPA and integrations use: documents, schemas, batches, chat (including SSE), org library, notifications, and — for allowlisted organizations — Black Hole ingest.

A smaller `/api/v1/` surface (documents, batches, schemas) is served on the same host and documented on the in-app **API** page. It is **not** in this OpenAPI export, so it is not listed below.

## Authenticate

Send one of:

| Scheme                   | When                                                                                                                                        |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Organization API key** | Server-to-server. Create it at `/api/keys/`. One active `sk-abacus-*` key per organization, shown once. `Authorization: Bearer sk-abacus-…` |
| **Auth0 access token**   | Signed-in user or desktop agent. Same Bearer header                                                                                         |
| **Session cookie**       | Browser app only. Do not use this for integrations                                                                                          |

[Ingest](/black-hole) refuses API keys. That group is Auth0-only, with `ingest:read` / `ingest:write` scopes, and 404s if the organization is not on the allowlist.

See [Authentication](/api-reference/authentication).

## Conventions that apply everywhere

* **JSON** request and response bodies, except file uploads (`multipart/form-data`) and a few downloads (file bytes, CSV/JSON export, SSE).
* **Trailing slashes** are part of the path (`/api/v2/batches/`, not `/api/v2/batches`).
* **Pagination** on lists is page-based: `?page=` (1-indexed) and `?page_size=`. Envelopes carry `page`, `page_size`, `total`, `has_more`. The ingest items feed is the exception — keyset cursor `?since=` + `?limit=`.
* **Tenancy.** The credential names the organization. Cross-tenant or unknown ids are **404**, not 403, so the API never confirms another tenant's row. Same-org "you can see it but cannot do that" is **403**.
* **Credits.** Completed extraction, reprocess, schema tests, and chat turns spend credits from the organization balance. Viewing, cell edits, and export do not. Rates: [What gets billed](/account/what-gets-billed).

## Resources

<CardGroup cols={2}>
  <Card title="Authentication" href="/api-reference/authentication">
    API keys, Auth0, and which surfaces refuse a key.
  </Card>

  <Card title="Errors" href="/api-reference/errors">
    Status codes you will actually see. No invented envelope.
  </Card>

  <Card title="Documents" href="/api-reference/documents/list-attachments">
    Library + unified attachment routes (canonical document id).
  </Card>

  <Card title="Schemas" href="/api-reference/schemas/list">
    Draft, publish, versions, copy, deprecate.
  </Card>

  <Card title="Batches" href="/api-reference/batches/list">
    List, add documents, cells, reprocess, export.
  </Card>

  <Card title="Chats" href="/api-reference/chats/list">
    Threads, attachments, SSE turns.
  </Card>

  <Card title="Sharing" href="/api-reference/sharing/list-shares">
    Org library and direct-share links.
  </Card>

  <Card title="Notifications" href="/api-reference/notifications/list">
    In-app library notifications for the signed-in user.
  </Card>

  <Card title="Ingest" href="/api-reference/ingest/register-agent">
    Black Hole desktop agent. Auth0 + allowlist.
  </Card>
</CardGroup>
