Skip to main content

API Keys

API keys authenticate requests to the ConsentForge management API. They are different from embed tokens — keep them secret and use them only from your backend.

Creating an API key

Account → API Keys → Create Key

  1. Enter a descriptive name (e.g. "Backend sync — production")
  2. Select the scopes your integration needs (minimum necessary)
  3. Set an expiry date (optional but recommended)
  4. Click Create

Copy the key immediately — it is shown only once.

Available scopes

ScopeAccess
properties:readList and view properties
properties:writeCreate and update properties
policies:readView policies and versions
policies:writeCreate, publish, rollback policies
receipts:readView consent receipts
receipts:exportExport receipts (large result sets)
webhooks:readView webhook configuration
webhooks:writeCreate and update webhooks
users:readList account users
users:writeInvite and remove users
scan:triggerTrigger scans via API
adminFull access — use sparingly

Key expiry

Set an expiry date to limit the blast radius if a key is compromised. Expired keys stop working automatically.

Rotate keys regularly. To rotate: create a new key → update your integration → delete the old key.

Revoking a key

Account → API Keys → [Key name] → Revoke

Revocation is immediate. Any integration using the key will start receiving 401 Unauthorized responses.

Key security best practices

  • Store keys in environment variables or a secrets manager, never in source code
  • Use one key per integration (easier to revoke a single compromised key)
  • Use the narrowest scope that works for your use case
  • Set an expiry date for keys used in CI/CD pipelines