# API reference (/docs/api-reference)



The dashboard, the CLI and the build runners all use this same public API; there are no private endpoints.

## Base URL [#base-url]

```
https://api.liftbay.dev
```

The machine-readable contract is served at `/v1/openapi.json`, and the typed TypeScript client `@liftbay/sdk` is generated from it.

## Authentication [#authentication]

| Caller           | How                                                                                                            |
| ---------------- | -------------------------------------------------------------------------------------------------------------- |
| CLI, CI, scripts | `Authorization: Bearer lbt_…`, an organization API token (Settings → API tokens). It has a role like a member. |
| Dashboard        | The `lb_session` cookie, set by sign-in.                                                                       |
| Build runners    | `Authorization: Bearer lbj_…`, a job token valid for one build only.                                           |

Each operation lists the permission it needs in `x-liftbay-permission`.

## Errors [#errors]

Every error has the same shape:

```json
{ "error": { "code": "validation_failed", "message": "Use UPPER_SNAKE_CASE…", "fields": { "key": "…" } } }
```

`fields` is present on validation errors and names each invalid input.
