Skip to content
Skip to Content

API overview

The public API at openpanel.sh/api/v1: its address, requests and answers, lists, retries, limits, and the reference made from its OpenAPI file.

The OpenPanel API does over HTTP and JSON what you do with projects, services, deploys, variables, domains and API keys. The CLI and the MCP server are made from the same list of operations, so each command and each MCP tool is exactly one API call, with the same checks and the same answers.

https://openpanel.sh/api/v1

Your first call

Make an API key (see Authentication), keep it in OPENPANEL_TOKEN, and ask who you are:

curl https://openpanel.sh/api/v1/me \
  -H "Authorization: Bearer $OPENPANEL_TOKEN"

The answer names the person behind the key, the organization the call works in and what the key may do:

{
  "user": { "id": "…", "name": "Rūta Kazlauskė", "email": "[email protected]" },
  "organization": { "id": "…", "name": "Shop", "slug": "shop", "logo": null, "role": "owner", "personal": false },
  "credential": { "kind": "key", "via": null, "keyId": "…", "scope": "deploy", "projectIds": null }
}

Requests and answers

  • Send bodies as JSON with Content-Type: application/json. A body is at most 256 KB.
  • Answers are JSON. A change that returns nothing answers 204 No Content; a create answers 201 Created with what it made.
  • Ids are UUIDs. Where a path takes {projectId} or {serviceId}, it is the id, not the name or slug; the CLI looks names up for you.
  • Times are ISO 8601 in UTC, such as 2026-12-01T19:47:19.929Z.
  • Every answer carries X-Request-Id. Send it to us when you ask for help with a request.
  • A setting you change on a service takes effect at its next deploy. See Deployments.

Organizations

An API key belongs to the organization it was made in and works only there. The CLI's token from openpanel login is the person's own sign-in and works in every organization they belong to: send OpenPanel-Organization with the organization's id or slug to choose one. Without the header, the call works in the organization that sign-in last chose, or else in the person's own.

curl https://openpanel.sh/api/v1/projects \
  -H "Authorization: Bearer $OPENPANEL_TOKEN" \
  -H "OpenPanel-Organization: shop"

With an API key, the header may only name the key's own organization; any other answers 403.

Lists

A list answers one page: { "data": [...], "nextCursor": "…" }. Pass nextCursor back as cursor for the next page, until nextCursor is null. limit is 1 to 100, and 50 when you leave it out.

curl "https://openpanel.sh/api/v1/projects?limit=20&cursor=MjA6MDE5M2I3YTA…" \
  -H "Authorization: Bearer $OPENPANEL_TOKEN"

A cursor remembers the last item it returned, so a list that changes between two pages continues after the same item.

Retries

The calls that create something accept an Idempotency-Key header: creating an API key, a project, a service, a volume, a deployment, a rollback and a domain. Send any unique string of up to 255 characters. If the answer is lost and you send the same request with the same key again, the API returns the first answer, with Idempotent-Replayed: true, instead of creating a second one.

curl https://openpanel.sh/api/v1/services/$SERVICE_ID/deployments \
  -X POST \
  -H "Authorization: Bearer $OPENPANEL_TOKEN" \
  -H "Idempotency-Key: deploy-$GITHUB_SHA"
  • A key is kept for 24 hours, and only after a success: when a create fails, the same key can be used again once you fix the request.
  • The same key with a different request answers 422 with the code idempotency_mismatch.
  • While the first request with a key is still running, a second one answers 409.

Rate limits

Each API key, and each person's token, may make 600 requests a minute. Requests without a working credential are limited to 60 a minute per address. Above the limit the API answers 429 with Retry-After: 60.

Errors

Every error is a problem detail (RFC 9457) with a stable code and a detail written for a person:

{
  "type": "https://openpanel.sh/docs/api/errors#invalid",
  "title": "Invalid request",
  "status": 422,
  "code": "invalid",
  "detail": "Turn on the load balancer to run more than one replica of a public service."
}

Errors lists every code and what to do about it.

Not offered yet

A few operations are in the reference but answer 501 with the code not_implemented and a sentence that says where to do it instead: inviting a member, and connecting or buying a server. Their pages say so at the top.

The reference

Every operation has its own page in the sidebar, grouped by what it works on, with its parameters, its body, its answers and a request in curl, TypeScript and Python. The reference is made from openapi.yaml, an OpenAPI 3.1 file generated from the same list of operations the API runs, so the two cannot drift apart. Point a client generator at that file to make a typed client.