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

# API

The Whalesync REST API creates and monitors syncs and Live Exports from code. Base URL, API keys, the OpenAPI spec, and where each part is documented.

The Whalesync REST API creates and monitors syncs and Live Exports from code. It uses JSON request and response bodies, API-key authentication, cursor pagination, and stable, machine-readable error codes.

* **Base URL:** `https://api.whalesync.com/v1`
* **Authentication:** an API key in the `Authorization` header. A person creates keys in **Settings → API keys** in the app; each key belongs to one team. See [Authentication](https://docs.whalesync.com/api/sync.md#authentication).
* **Spec:** OpenAPI 3.1 at `https://api.whalesync.com/v1/openapi.json`
* **Discovery:** `https://api.whalesync.com/llms.txt`

An AI agent that can use MCP should use the [MCP server](https://docs.whalesync.com/mcp.md) instead. It signs in through the browser, so no one has to create an API key.

## Pages

[Quickstart](https://docs.whalesync.com/api/quickstart.md): For agents that call the REST API: get a key, relay the steps only a person can do, and build a sync or a Live Export.

[Sync API](https://docs.whalesync.com/api/sync.md): Authentication, conventions, and every endpoint for syncs, under /sync/.

[Live Export API](https://docs.whalesync.com/api/live-export.md): Every endpoint for Live Exports, under /live-export/.

[Error codes](https://docs.whalesync.com/api/error-codes.md): Every error code the API returns, with its HTTP status and how to handle it.
