API tokens
API tokens authenticate integrations, scripts, deploy webhooks, and MCP clients to Coolify. Each token belongs to the user who creates it, is bound to the active team, and carries selected permissions and access.
A token grants access without an interactive sign-in or 2FA challenge. Store it in a secret manager, never commit it to a repository, and revoke it immediately if it is exposed.
Before you create a token
Choose the team and API controls first:
- Switch to the team that owns the resources the integration must access. A token cannot access another team's resources.
- On self-hosted Coolify, open Settings > Advanced and set API access to Enabled.
- When callers use predictable source addresses, set Allowed IPs to the required IP addresses or CIDR ranges.
- Decide the smallest permission set, the narrowest access, and the shortest practical expiration period.
Coolify Cloud keeps API access available, so Cloud users do not enable the instance-wide API access setting.
Create a token
Open API Tokens
Open Keys & Tokens in the main sidebar, then select API Tokens. Select New token to open the New API token form.
Describe the token
Enter a Description that identifies the caller and purpose, such as production-status-monitor or docs-deploy-workflow.
The description must contain between 3 and 255 characters.
Choose an expiration
Use Expires in to select 7 days, 30 days, 60 days, 90 days, 1 year, or Never.
Prefer an expiration date for automation that can be rotated. Use Never only when the integration cannot be rotated safely on a schedule.
Select permissions
Open Permissions and select only the permissions required by the integration. Review Token permissions before using write, delete, read:sensitive, or root.
Choose the access
Under Access, set Resources:
- All resources in the team lets the token use every project, resource, and team-level endpoint that its permissions allow.
- Selected projects, environments, or resources limits the token. Choose the items in Selected.
Read Token access before you limit a token.
Create and copy the token
Select Create token. Coolify shows the token in the Copy your token window. Copy it before you select Done: Coolify does not show the complete value again after you close the window.
Store it in the caller's secret manager. If the value is lost, roll the token to get a new value.
Token permissions
| Permission | Use it for | Important behavior |
|---|---|---|
read | List and inspect resources. | Sensitive response values remain redacted. |
read:sensitive | Read secrets, logs, passwords, private keys, environment values, and Compose content returned by supported endpoints. | Coolify also adds read when this permission is selected. |
write | Create and update resources through write endpoints. | It cannot delete. Add delete when the caller must delete. |
delete | Delete resources, environment variables, storages, backups, scheduled tasks, and tags, and detach a tag. | Every DELETE request requires delete or root. |
deploy | Trigger deployments, restarts, stops, cancellations, and deploy webhooks (/api/v1/deploy). | With write, it also applies changes that run on servers at once, such as scheduled tasks, proxy configuration, and imports. |
root | Bypass the read, write, delete, and deploy permission checks on API endpoints. | Instance-wide API access and IP allowlist controls and the token's access still apply. Selecting it removes the other permissions because they are unnecessary. |
If an integration depended on write for deletes before v4.6.0, edit its token to add delete. Verify the owner's role and resource access for those operations.
Use read for inventory and monitoring, deploy for a deployment-only workflow, and write only when the caller must change configuration. Add delete only when the caller must delete, and read:sensitive only when redacted values are insufficient.
Team administrators and owners can select every permission. A member can select only the permissions that their own access in the team includes. Most sensitive values are returned only when the token owner is a team administrator or owner. The token of a Member gets the secrets of an application, service, database, or environment variable when the access of the Member includes Read secrets on that resource. Team credentials and server secrets stay hidden from Members. Container logs need only read:sensitive. See Sensitive response data.
A root token still belongs to one team and its owner must remain a member of that team. It does not provide cross-team access.
Token access
A token never gets more access than its owner. A token with All resources in the team can use every endpoint that its permissions allow. A member who has access only to some projects or resources can create only limited tokens.
A token limited to Selected projects, environments, or resources:
- sees only the selected items. A selected project includes its environments and resources, and a selected environment includes its resources.
- can use only the endpoints for applications, services, databases, projects, deploy webhooks (
/deploy), deployments, resources, the version, and vulnerabilities. Team-level endpoints, such as servers, keys, Git sources, and notifications, return403 Forbidden. - does not receive server secrets, such as the Sentinel token, log drain keys, and the saved proxy configuration, in application, service, and database responses.
The Issued tokens list shows All resources in the team under each token, or the number of selected projects, environments, and resources, such as 2 projects, 1 resource. Select the numbers to see the items. A deleted item shows as Unavailable project, Unavailable environment, or Unavailable resource. Edit the token and remove it: a token of a member stops working until you do.
Read API Permissions for the complete rules.
Make a test request
Send the complete token as a Bearer credential:
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"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. Do not paste a real token directly into shell history; load it from the caller's secret store in production.
Read Making Requests for request examples and API Permissions for token scope and role restrictions. Rate Limits documents response headers and retry behavior, while API Errors covers status codes. For deployment-only automation, follow Deploy Webhooks.
Team and role scope
Coolify records the active team when the token is created. Switching teams later does not change an issued token.
- Create a separate token for each team an integration must access.
- Removing the token owner from the team makes the token invalid.
- If the token owner loses access that the token uses, the token stops working and returns
403 Forbidden. The owner can edit the token to remove that access, or revoke it. - Changing a user's password revokes that user's API tokens.
- Removing a member, downgrading a member's role through Coolify, or deleting a team revokes affected team tokens.
The Issued tokens list shows only the tokens of the signed-in user for the active team. Switch teams to see your tokens of another team. A user can manage their own tokens but cannot copy a secret value again.
A team that requires two-factor authentication does not block its API tokens. The requirement applies only to dashboard sign-in.
Manage a token
Open Keys & Tokens > API Tokens, then open the Token actions menu (...) at the end of the token's row:
| Action | Result |
|---|---|
| Edit | Change the Description, Expires in, Permissions, and Access in the Edit API token form, then select Save changes. The token value does not change. Clients get the new access on their next request. Keep current keeps the expiry date. Another choice sets a new expiry date from today. |
| Pause | Stop the token without deleting it. A paused token returns 401 Unauthenticated from the API and cannot authenticate to the MCP server. The list marks it Paused. |
| Resume | Let a paused token authenticate again. The token value does not change. |
| Roll | Replace the secret. The description, permissions, access, and expiry do not change. Enter the token description to confirm, then select Roll token. The current secret stops working at once. Copy the new value from the Copy your token window. |
| Revoke | Delete the token permanently. Enter the token description to confirm, then select Revoke token. |
Rotate a token
Rotate a token before it expires or whenever its storage or caller changes.
Roll is the quickest way. The previous secret stops working at once, so update the integration immediately after you roll the token.
To rotate without an interruption, use a replacement token:
- Create a replacement with the same team and only the permissions and access still required.
- Copy the replacement into the integration's secret store.
- Make a test request with the replacement.
- Revoke the previous token.
- Confirm that the integration continues working and the previous token now returns
401 Unauthenticated.
An expired token is rejected automatically. Coolify checks every hour for tokens that expire soon. It warns 7 days before a token expires, or 24 hours before for a token that lives 7 days or less. The warning goes to every enabled notification channel of the token's team. When you edit a token and set a new expiry, Coolify sends a new warning before the new date.
When a client sends too many failed REST API requests with a token, Coolify blocks the token for the REST API for a short time and notifies its team. MCP requests are not counted. See Failed request limit.
