For AI agents: a documentation index is available at https://docs.coverbase.com/llms.txt. This page is also available in markdown by appending .md to the URL.
The API Keys API lets an organization administrator manage the ak_* keys used to authenticate the Coverbase public API without contacting Coverbase support.
These endpoints accept either an admin dashboard session JWT (a user with the
admin org role) or an ak_* key that carries the keys:manage scope. The scoped-key path lets headless and middleware integrations manage keys without a short-lived dashboard token. A standard integration key carries no scopes and cannot manage keys, so a compromised integration key cannot be used to mint, rotate, or revoke other keys.target_type=api_key. The Coverbase backend brokers calls to the underlying identity provider (Clerk), so customers do not need direct Clerk dashboard access. Coverbase stores only the (org, clerk_key_id) → scopes mapping, never the secret.
Key scopes
A key can carry zero or more admin scopes. A standard integration key has none and can only call ordinary/v1/* routes; granting a scope turns a key into a long-lived admin credential.
The dashboard’s API keys page (Configuration, under Developers and integrations) offers the same scopes under Admin scopes (optional) when an admin creates a key. See API key scopes before granting the last two.
List API keys
GET
GET /v1/api-keysak_* API key belonging to your org, including revoked and expired keys. Use this to audit which keys exist before rotating or revoking.
Auth: admin dashboard JWT or an ak_* key with the keys:manage scope.
Example request
cURL
Example response
Response fields
Each entry contains:string
The key’s Clerk-side identifier (the prefix portion of
ak_*). The raw secret is not returned by this endpoint; it is only available at the moment of creation or rotation.string | null
Human-readable name set at creation time.
integer | null
Unix timestamp (seconds) when the key was created.
integer | null
Unix timestamp (seconds) of the most recent successful authentication, or
null if never used.boolean
true if the key has been revoked.boolean
true if the key has passed its expiration.string[]
The admin scopes granted to the key. Each value is one of
"keys:manage", "audit:read", "banking:read", or "review:sensitive_changes". A standard integration key returns an empty array ([]).string | null
The Clerk user ID of the admin who created the key.
Create an API key
POST
POST /v1/api-keysak_* secret is returned once in the response body; store it immediately. Coverbase does not retain the plaintext, so a lost secret can only be replaced (rotated), not recovered.
Auth: admin dashboard JWT or an ak_* key with the keys:manage scope. Note that supplying scopes requires an admin JWT (see below).
Request body
string
required
Human-readable name for the key (for example,
"ServiceNow exporter"). Must be non-empty after trimming.integer
Optional. Seconds until the key automatically expires. Omit for a non-expiring key. Recommended for keys used by short-lived integrations (for example,
31536000 for a one-year rotation policy).string[]
Optional. Admin scopes to grant the new key: any subset of
"keys:manage", "audit:read", "banking:read", and "review:sensitive_changes". Omit or pass [] to mint a standard integration key with no elevated access. Granting scopes requires an admin dashboard JWT; a non-admin or scoped-key caller that supplies a non-empty scopes array is rejected with 403 scope_grant_forbidden.Example request
cURL
Example response
201 Created:
Rotate an API key
POST
POST /v1/api-keys/{api_key_id}/rotate(rotated YYYY-MM-DD) suffix, because the identity provider rejects duplicate names; a second rotation on the same day adds a counter, such as (rotated 2025-05-07 2). Use this when a secret may have been compromised, or as part of a scheduled rotation policy. The new key inherits the same scopes as the rotated key, so a scoped admin key stays scoped after rotation.
If revocation of the original key fails after the new key is minted, the new key is automatically rolled back (also revoked) so the operation never leaves you with two simultaneously-active keys.
Auth: admin dashboard JWT or an ak_* key with the keys:manage scope.
Path parameters
string
required
The key’s Clerk-side identifier (the prefix portion of
ak_*, as returned by List API keys).Example request
cURL
Example response
Distribute the new
secret to all systems that use the rotated key before removing the old one’s grace period. The old key is revoked immediately on a successful rotate, so any process still using it will start receiving 401 Unauthorized responses.Revoke an API key
POST
POST /v1/api-keys/{api_key_id}/revoke401 Unauthorized. The key still appears in List API keys with revoked: true for audit purposes. Revoking clears any scopes the key carried, so a revoked admin key retains no elevated access.
The endpoint is idempotent: the first revocation (the active → revoked transition) is recorded in the activity log, but re-revoking an already-revoked key is a no-op that writes no additional audit entry.
Auth: admin dashboard JWT or an ak_* key with the keys:manage scope.
Path parameters
string
required
The key’s Clerk-side identifier.
Request body
string
Optional. Free-form revocation reason (for example,
"Employee offboarded", "Suspected leak in Sentry log"). Recorded for compliance.Example request
cURL
Example response
200 OK: returns the same shape as List API keys, with revoked: true.
What a key can do
A key acts with the permissions of the service account role, whatever your organization’s role-based access setting. When a key calls an endpoint that needs a permission its role does not hold, the endpoint returns403 with the code api_key_not_allowed and a message that names the permission. The default service account role does not hold org_settings, billing, audit_trail, dark_web_exposure, screening_match, rfp:approve or rfp:archive, so a key cannot use the endpoints that need them. A signed-in user calling the same endpoint is checked against their own role.
The same code also means the action stays a human decision. A key never archives, unarchives, deletes or approves, whatever its role holds.
Authorization & audit
- Each endpoint accepts either an admin dashboard JWT (org
adminrole) or anak_*key carrying thekeys:managescope. A JWT caller without the admin role, or a key withoutkeys:manage, is rejected. - Granting scopes is admin-only. A non-empty
scopesarray on create can only be supplied with an admin JWT; a scoped-key caller that passesscopesis rejected with403 scope_grant_forbidden. A scoped key can manage keys but can never grant scopes; there is no self-propagation. - Create and rotate always write a
CbActivityrow (record_creationfor create,field_updatefor rotate) againsttarget_type=api_key. A revoke writes afield_updaterow only when it transitions a key from active to revoked; re-revoking an already-revoked key is an idempotent no-op and writes nothing. These rows are visible to admins in Configuration → Audit Logs (in the Integrations group).