Before you create a key
- Who: an owner or an admin, in the Deployz dashboard. A member can see the list of keys but can’t create or revoke one. See Organization and team.
- The key depends on you. A key works only while the person who created it is an owner or an admin of the organization. If you leave the organization or become a member, every key you created stops working. See If the key creator changes role.
- Limit: an organization can have 10 active keys. Revoked and expired keys don’t count. To create another, revoke one first.
Choose a permission
Use a Read key for a status check or a report. Use a Deploy key for a pipeline that releases your application. A request that needs Deploy with a Read key answers
403 with the code INSUFFICIENT_KEY_PERMISSION.
Create a key
Who: an owner or an admin, in the Deployz dashboard.- In the sidebar, select API keys.
- Select Create API key.
- In Name, enter a name that says where you’ll use the key, for example
GitHub Actions. - In Permission, select Read or Deploy.
- In Expires after, select 30 days, 90 days, or 365 days. The default is 90 days. A key can’t be set to never expire.
- Select Create key.
- In Copy your API key, select Copy, then store the key in your CI secrets, for example as a GitHub Actions secret named
DEPLOYZ_API_KEY. - Select Done.
Send the key
Send the key as a bearer token in theAuthorization header:
dz_. The API doesn’t accept your dashboard sign-in, and the dashboard doesn’t accept a key.
Check your keys
The API keys page lists every key with its Permission, who created it, when it expires, when it was last used, and its Status:Revoke a key
Revoke a key when you no longer need it or if it might have leaked. The key stops working on the next request, and this can’t be undone. Who: an owner or an admin, in the Deployz dashboard.- In the sidebar, select API keys.
- In the key’s row, select Revoke.
- In Revoke
<name>?, select Revoke key.
Replace a key
To replace a key before it expires, or when the person who created it is leaving:- Create a new key with the same permission.
- Update the secret in your pipeline with the new key.
- Run the pipeline once, or check Last used on the new key.
- Revoke the old key.
If the key creator changes role
When the person who created a key leaves the organization or becomes a member, the key answers401 KEY_CREATOR_INACTIVE, and its status changes to Inactive creator. Deployz doesn’t revoke the key. It works again if that person becomes an owner or an admin again.
Before an owner or an admin leaves, have someone who stays create new keys and update your pipelines.