> For the complete documentation index, see [llms.txt](https://sandgarden.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandgarden.gitbook.io/docs/reference/api-overview.md).

# API Overview

This page covers direct integration with Doc Holiday's API.

### Overview

The public API covers the published contract for `Connection`, `Conversation`, and related records. The generated OpenAPI spec defines the base URL, response statuses, and error shape. Only endpoints exposed in the public contract belong here.

### Authentication and transport

* Base URL: `https://api.doc.holiday/api/v1`
* OpenAPI spec: `https://api.doc.holiday/api/v1/openapi.yaml` (unauthenticated)
* Create API keys in **Settings → API Keys**. That route is admin only.
* The create form sets `expiresAt` to 48 hours from creation by default. Change the expiration date to keep a key valid longer.
* The token appears only once after creation. Store it immediately.
* Send the key in `Authorization: Bearer <token>`.

### Naming and errors

Doc Holiday's API predates the rename from Automations to Publications. Current public endpoints use `/api/v1/publications/*`; `/api/v1/automations/*` remains available only as a deprecated alias.

Conversations are the API name for what the app shows as **Work History**: the `/api/v1/conversations/*` endpoints back that page. See the [Work History API](/docs/reference/work-history-api.md).

API responses follow the OpenAPI contract:

* Success responses commonly use `200`, `201`, `202`, or `204`.
* Error responses return JSON in the form `{"error": "..."}`.
* Common failure statuses include `400`, `401`, and `500`.

### Permissions

An API key acts as the user who created it, so that user's organization membership and role permissions determine what the key can access.

### Resource map

| Page                                                              | Use it for                                            |
| ----------------------------------------------------------------- | ----------------------------------------------------- |
| [Publications](/docs/reference/publications-api.md)               | Publication records and Publication-scoped operations |
| [Connections](/docs/reference/connections-api.md)                 | connection records and connection-scoped operations   |
| [Work History](/docs/reference/work-history-api.md)               | conversations, turns, and comments                    |
| [Users](/docs/reference/users-api.md)                             | user identity and account data                        |
| [Instruction Library](/docs/reference/instruction-library-api.md) | instructions and instruction links                    |
| [Audit Logs](/docs/reference/audit-log-api.md)                    | audit log records                                     |
