# API reference

> Fleetdock Manager HTTP API — authentication, endpoints, schemas, and an interactive playground.

Source: https://fleetdock.dev/docs/api


The Fleetdock Manager exposes a REST API for provisioning databases, running backups,
managing users, and coordinating agents. Endpoints are grouped by resource in the sidebar
(Health, Auth, Instances, Backups, and so on). The active API version applies globally across
the docs — when multiple versions are available, use the version selector in the sidebar.

## Base URL [#base-url]

Point requests at your Manager host — the same origin that serves the dashboard:

```text
https://db.example.com
```

Running the Go API directly for development, without the bundled proxy, it is
`http://localhost:8080`.

## Authentication [#authentication]

Most `/v1` routes require a **Bearer token** in the `Authorization` header:

* **JWT** — obtained from `POST /v1/auth/login` with email and password.
* **API token** — long-lived tokens prefixed with `fleetd_`, created under **Profile → API tokens**.

Agent routes under `/agent/v1` use **agent bearer tokens** prefixed with `fleeta_`.

<Callout type="info">
  Public routes (health checks, install script, and this documentation) do not require
  authentication.
</Callout>

## Interactive playground [#interactive-playground]

Each endpoint page includes a playground where you can send requests. They go straight from
your browser to your Manager, so it must allow this site's origin: set
`FLEETDOCK_CORS_ORIGIN=https://fleetdock.dev` (see [Manager installation](/docs/manager)), or copy
the generated `curl` command and run it instead.

Set the server URL in the playground to your Manager before sending authenticated requests.

## OpenAPI spec [#openapi-spec]

The machine-readable spec is available at `GET /openapi.yaml` on any running Manager, and
is mirrored in the
[Fleetdock repository](https://github.com/Fleetdock/fleetdock/blob/main/backend/internal/openapi/openapi.yaml).

To refresh the copy used by this site from a local monorepo checkout:

```bash
pnpm sync:openapi
```
