Skip to main content
Manage API keys from code: list the account and workspace API keys you can revoke, create keys for scripts and CI jobs, and revoke keys at once. Use it to give each job its own key, and to rotate keys without opening Paradime.
Prerequisites:
  • These operations are available on every plan.
  • For workspace API keys: an account API key with the X-Paradime-Workspace header, or a workspace API key. For account API keys: an account API key, with no X-Paradime-Workspace header needed.
  • The API keys admin capability group, and every capability group that you give the new key.
The schema calls an account API key a company API key. Keys, errors, and pagination work the same in every area. See Conventions.

Operations

Never more access than the calling key

Every key the API creates, lists, or revokes stays within the access of the key that calls it:
  • Capability groups. Each group you give must be one the calling key holds in full. Otherwise the call fails with MISSING_CAPABILITY on that group’s input path, such as ["input", "capabilityGroups", "1"]. Give at least one group. Pass groups by their enum value, such as MANAGE_BOLT_ADMIN for Bolt admin: see Capability groups. Every group can go on both key types, except Workspace admin, which only account keys can hold.
  • Workspaces. Each workspace of a new account key must be one the calling key can reach. Otherwise the call fails with MISSING_CAPABILITY on ["input", "workspaceUids", "<index>"]. A workspace that doesn’t exist gets the same error, so the answer never shows which workspaces exist.
  • Expiry. expiresAt must be in the future, and no later than the calling key’s own expiry. If the calling key expires, expiresAt is required. When you generate an account key in Paradime, Lifetime (days) is required, so that key expires, and every key it creates must send expiresAt. Leave expiresAt out for a key that never expires, which only a calling key that never expires can create.
  • Lists and revokes. The lists show only the keys the calling key could revoke: keys with no capability, and for account keys no workspace, beyond its own. totalCount counts only those keys. An account key’s workspaces lists only the workspaces the calling key can reach.

Create a workspace API key

createApiKey creates a key in the targeted workspace. The name must be unique among the workspace’s working keys, ignoring spaces at the start and end.
token is shown only in this response, and never read back. Store it now, in a password manager or your CI secret store.
The token starts with prdm_wsp_. Send it as Authorization: Bearer <token>. A workspace key is bound to its workspace, so it needs no X-Paradime-Workspace header. See Authentication.

Create an account API key

createCompanyApiKey creates an account key that can reach the workspaces in workspaceUids. It needs an account key. The name must be unique among the account’s active account keys.
The token starts with prdm_cmp_. Send it as Authorization: Bearer <token>, with X-Paradime-Workspace to pick the workspace of a workspace-level call.

List and revoke keys

Workspace.apiKeys lists the targeted workspace’s working keys, oldest first, and companyApiKeys the account’s active account keys. Neither returns a token. lastUsedAt shows when a key last made a request.
revokeApiKey and revokeCompanyApiKey take the key’s id, and the key stops working at once. The calling key can revoke itself. Revoking a key again, or a key that already expired, succeeds and writes no new audit entry. A revoked workspace key reads expiresAt as the moment it was revoked. A revoked account key has revokedAt.

Rotate a key

To rotate a key, create its successor, move your clients to it, then revoke the old key.
1

Create the successor

Call createApiKey or createCompanyApiKey with the same capability groups and, for an account key, the same workspaces. Give it a new name, such as one with the date: a name that a working key holds is a CONFLICT.
2

Move your clients

Store the new token, and update every script, CI job, and secret store that uses the old one.
3

Revoke the old key

Call revokeApiKey or revokeCompanyApiKey with the old key’s id. The old key can make this call itself, as its last request.
A key can’t create a key that expires later than itself. To rotate to a later expiry, create the successor with a key that expires later, or never, or generate it in Paradime. The lists return each key’s capabilities, such as bolt:schedules:list, not its capability groups, so keep the groups each key needs in your own configuration.

Errors

These are the cases specific to API keys. For the error format and the codes every area shares, see Errors. The Python SDK and the CLI have no commands for API keys: use the GraphQL API.