Skip to main content
Everything the dashboard does goes through a JSON API under /api. Use it for scripts and integrations the CLI doesn’t cover. The authoritative list of routes, with the role each needs, is internal/api/router.go.

Authentication

The API uses the same session cookie as the dashboard. There are no API tokens.
The cookie is mangrove_session and lasts 30 days. Sign-in is limited to 5 attempts per 5 minutes per IP, so sign in once and reuse the cookie. mangrovectl login stores the same token in ~/.mangrove/session.

Conventions

  • Request and response bodies are JSON. Send Content-Type: application/json.
  • Errors have a status code and a body of {"error": "message"}.
  • 204 No Content means success with nothing to return.
  • A resource in a workspace you can’t access returns 404, the same as one that doesn’t exist.
  • IDs are integers. Deployments and projects also have slugs, but the API addresses them by ID.

Main endpoints

Account

Workspaces and projects

Deployments

Services

Admin

No sign-in

Stability

The API is the dashboard’s own backend, not a versioned public API. Fields can change between versions. The Go types in internal/models and the typed client in internal/apiclient always match the server they were built with.