API Tokens

API tokens let you call the Depfloy API from scripts, CI pipelines, or third-party integrations. The page is Settings → API tokens.

Create a token #

Open Settings → API tokens and click New Token in the page header. In the dialog, give the token a recognisable name, choose its permissions, and click Create Token. The full token string is shown only once, in the Copy Your API Token dialog — copy it immediately and store it somewhere safe (a password manager, your CI provider’s secret store). Once you close the dialog, only the permissions can be changed; the token string cannot be retrieved.

You can create as many tokens as you need, and search the list from the top of the page.

Permissions #

Each token has its own set of permissions. This way you can hand out a token that can only read deployment status, for example, without giving the token holder write access.

Permissions on a token narrow what it can do — they never widen it. Your role on the organization still applies, and so does any restriction to specific servers or projects on your membership. A token ticked with deployment:create, held by someone whose role cannot deploy, still cannot deploy.

Both sides have to allow an action, which is why a refusal names the permission that was missing: it tells you whether to widen the token or to ask an owner about your role. A read-only token cannot trigger a deployment — that needs deployment:create.

Adding an SSH key through the API (POST /api/v1/ssh-keys and POST /api/v1/servers/{server}/ssh-keys) needs the terminal:write permission on the token, the same tier as opening a terminal: a key installed on a server goes into the depfloy user’s authorized_keys, and that user has root on the server. Removing a key needs server:update.

Error Tracking has three permissions of its own: error:read to list issues and read alert rules, error:manage to resolve, ignore and delete issues, and error:configure to set up, rotate or remove the plugin and to edit alert rules.

Webhooks use integration:read to list endpoints and read the delivery log, and integration:manage to create, change, test, redeliver and delete them.

API token permissions

You can change a token’s permissions later with Edit permissions in the token’s row menu — useful if you over-scoped it on creation, or if you want to tighten permissions on a token already in use without rotating it.

Revoke a token #

Choose Revoke token in the token’s row menu to revoke it immediately. Any clients still using the token will start getting 401 Unauthorized responses on their next call. Revocation is permanent; you cannot un-revoke a token (create a new one instead).

Unused tokens #

A token that has not been used for 30 days is deleted, and a token that was never used is deleted 30 days after it was created. For an integration that may go longer between calls, tick Keep when idle when you create the token, or turn it on later with Edit permissions in the token’s row menu. Tokens kept when idle show a Kept when idle badge in the list and stay until you revoke them.

Rate limits #

The Depfloy API allows up to 120 requests per minute per user. All of your tokens share this budget. If you exceed it, you will get a 429 Too Many Requests response — slow your call rate or batch requests to stay under the limit.

For full API documentation, see API Reference → Quickstart.