# API reference

> Every /api/v1 endpoint, generated from the OpenAPI spec the server is built from.

The Orbitwrite API is served at `https://orbitwrite.com/api/v1`. Every page in this section is generated from
the same OpenAPI document the server validates requests against, so it changes when the API does.

- [Authentication](https://orbitwrite.com/docs/developers/authentication): API keys, OAuth tokens and the scopes they carry.
- [Errors and rate limits](https://orbitwrite.com/docs/developers/errors-and-limits): Status codes, error bodies and how to back off.
- [OpenAPI spec](https://orbitwrite.com/api/v1/openapi.json): The raw document, for code generators and API clients.

## Base URL and auth

Send a workspace API key as a bearer token:

```bash
curl https://orbitwrite.com/api/v1/me \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
```

A key belongs to one workspace, so most endpoints work out the workspace from the key. Where an endpoint asks for
an `organizationId`, it is the `organization.id` that `GET /me` returns.

Each endpoint lists the credentials it accepts. A few are used only by the Orbitwrite app with a signed-in session
and refuse an API key.
