Skip to content

API Keys

Path: /api-keys

API Keys

Manage API keys for programmatic access to the GRCFlow API. Use these for CI/CD integrations, automated evidence collection, or custom integrations.

Key Elements

  • Create API Key - Generate a new key with specific scopes.
  • Key table - Name, scopes, created date, last used, and status (active/revoked).
  • Actions - Rename the key or revoke it. Scopes are fixed at creation and cannot be changed afterward.

How to Create an API Key

  1. Click Create API Key.
  2. Enter a name describing its purpose.
  3. Select the scopes (permissions) the key should have.
  4. Copy the generated key immediately - it won't be shown again.

How a Key Authenticates

Send the key on the standard header. There is no X-API-Key header.

Authorization: Bearer sk-xxxxxxxxxxxxxxxx

A key is deliberately narrower than the person who created it:

  • It acts as its creator, in its own organization only. Requests are attributed to the user who created the key. A request whose path names a different organization is refused with 403.
  • Its creator's current role is a ceiling. A key can never do more than the user who created it can do right now. If that user is demoted, the key is demoted with them; if they are deactivated or removed, the key stops working. Have a long-lived service account (not a personal account) create keys that must outlive staff changes.
  • Every request needs a scope. The required scope is derived from the request: the resource from the path, read: for GET and write: for everything else. A missing scope returns 403 API key missing required scope: <scope>.
  • Revocation is immediate. A revoked or expired key is rejected (401) on its very next request.

What Each Scope Reaches

Path (under /api/v1) Read (GET) Write (other methods)
/orgs/{org_id}/vendors/... read:vendors write:vendors
/orgs/{org_id}/vendors/assessments/..., /orgs/{org_id}/assessments/..., /orgs/{org_id}/findings/... read:assessments write:assessments
/orgs/{org_id}/evidence/... read:evidence write:evidence
/orgs/{org_id}/risks/... read:risks write:risks
/orgs/{org_id}/incidents/... read:incidents write:incidents
/orgs/{org_id}/policies/... read:policies write:policies
/orgs/{org_id}/controls/..., /frameworks/... read:controls not available
/orgs/{org_id}/schedule/..., /orgs/{org_id}/dashboard/..., /orgs/{org_id}/posture/... read:compliance not available
/orgs/{org_id}/api-keys/... admin:api-keys admin:api-keys

read:* and write:* are shorthand for all of the read: / write: scopes in this table. They do not unlock anything else.

Everything not in the table is closed to API keys and returns 403 This endpoint is not available to API keys, whatever scopes the key holds. That includes user and invitation management, organization settings, system administration, the audit log, the Steampipe and OPA explorers, and /users/me. Use an interactive session for those.

The role check still applies on top of the scope: a write:vendors key created by a viewer cannot create vendors, because a viewer cannot.