All Docs

API Keys

API keys let external tools authenticate with your Cognova workspace. They're used by the MCP server, Claude Code skill, REST API, and any custom integrations.

Create an API Key

  1. Go to Settings > API Keys
  2. Enter a name (e.g., "Claude Code", "CI Pipeline")
  3. Click Create Key
  4. Copy the key immediately — it's shown only once

API keys use the cg_ prefix followed by 48 hex characters:

cg_a1b2c3d4e5f6...

Key Properties

PropertyDescription
NameHuman-readable label for identification
PrefixFirst 11 characters (cg_ + 8 hex), shown in the UI for identification
Last UsedTimestamp of the most recent API call
CreatedWhen the key was generated

Security

  • Keys are hashed with bcrypt before storage — Cognova never stores the raw key
  • Each key is scoped to a single workspace
  • Revoke keys instantly from the API Keys settings page
  • Use separate keys for different tools so you can revoke individually

Revoking Keys

  1. Go to Settings > API Keys
  2. Click the trash icon next to the key
  3. Confirm revocation

Any tools using the revoked key will immediately stop working. Generate a new key and update your tool configuration.

Using Your Key

All external APIs accept the key via the Authorization header:

curl -H "Authorization: Bearer cg_YOUR_KEY" \
  https://cognova.dev/api/v1/agents

See the integration guides for specific setup instructions: