Skip to main content
API keys provide programmatic access to the Coval API. You can create keys scoped to specific environments and permissions.
You can also create and manage API keys from the dashboard. See the API Keys guide for instructions.

List API Keys

coval api-keys list [OPTIONS]
OptionTypeDefaultDescription
--filterstringFilter expression
--page-sizenumber50Results per page
--order-bystringSort order
--statusstringFilter by status (active, revoked, suspended, expired)
--environmentstringFilter by environment (production, staging, development)
Output columns: ID, NAME, TYPE, ENV, STATUS, PERMISSIONS, LAST USED
# List all API keys
coval api-keys list

# Filter by environment
coval api-keys list --environment production

# List only active keys
coval api-keys list --status active

Create API Key

coval api-keys create [OPTIONS]
OptionTypeRequiredDescription
--namestringYesDisplay name for the key
--descriptionstringNoOptional description
--typestringYesKey type (service or user)
--environmentstringYesTarget environment (production, staging, development)
--permissionsstringNoComma-separated permission scopes
The full API key is only shown once at creation time. Store it securely — it cannot be retrieved later.

Key Types

TypeDescription
serviceFor server-to-server integrations and CI/CD pipelines
userFor individual user access
# Create a production service key
coval api-keys create \
  --name "CI Pipeline" \
  --type service \
  --environment production

# Create a development key with description
coval api-keys create \
  --name "Dev Testing" \
  --type user \
  --environment development \
  --description "Key for local development"

Update API Key

coval api-keys update <api_key_id> [OPTIONS]
ArgumentTypeRequiredDescription
api_key_idstringYesThe API key ID to update
OptionTypeRequiredDescription
--statusstringYesNew status (active, revoked, suspended, expired)
--reasonstringNoReason for the status change
# Revoke a key
coval api-keys update ak_abc123 --status revoked

# Revoke with a reason
coval api-keys update ak_abc123 --status revoked --reason "Key compromised"

Delete API Key

coval api-keys delete <api_key_id>
ArgumentTypeRequiredDescription
api_key_idstringYesThe API key ID to delete
coval api-keys delete ak_abc123