API Authorization

Coolify authenticates protected API requests with Bearer tokens. Each token belongs to the user and active team that created it and includes the permissions and access selected for it.

Before you make a request

Follow API Tokens to:

  • create a token for the correct active team
  • choose permissions, access, and an expiration period
  • copy the token into the caller's secret store

Use a separate token for each integration and team. Do not place tokens in source code, query strings, or deployment logs.

Coolify Cloud API access is already enabled, so Cloud users only need to create a token. On a self-hosted instance, an administrator must also enable API access.


Send a Bearer token

Include the complete token in the Authorization header of every protected request:

export COOLIFY_URL="https://coolify.shadowarcanist.com"
export COOLIFY_TOKEN="<api-token>"

curl --fail-with-body \
  --header "Authorization: Bearer $COOLIFY_TOKEN" \
  "$COOLIFY_URL/api/v1/team"

The header format is:

Authorization: Bearer <api-token>

The token includes an ID, a | separator, and the secret value. Send the complete value exactly as Coolify displayed it when the token was created or rolled.

A successful request returns the team bound to the token. A token limited to selected projects, environments, or resources gets 403 Forbidden from this team-level endpoint. Test it with GET /api/v1/projects instead.


Authorization checks

A protected request passes through these checks:

  1. The token exists, has not expired, is not paused, and authenticates a user.
  2. The user still belongs to the team recorded when the token was created.
  3. The token does not have more access than its owner currently has in that team.
  4. On a self-hosted instance, API Access is enabled and the caller matches the IP allowlist when one is set. The instance-administrator endpoints check only the IP allowlist.
  5. A token limited to selected projects, environments, or resources calls an endpoint for projects and resources, not a team-level endpoint.
  6. The token has the permission required by the endpoint, unless it has root.
  7. The requested project, environment, or resource is inside the access of the token and its owner. Some endpoints also need the token owner to be a team administrator or owner. See Permissions.
StatusTypical meaning
401Unauthenticated. The token is missing, invalid, expired, paused, revoked, or no longer belongs to a current team member.
403Forbidden. API access or the caller's IP is blocked, the token lacks the required permission or access, or the token has more access than its owner.
429Too many requests. The caller sent too many requests or too many failed requests. See Rate Limits.

See API errors for other status codes and response-handling guidance.


Review Permissions before choosing token permissions and access. Read the API overview for base URLs and the other API reference sections.

On this page