Documentation · Administration · Settings

API keys

Settings → API keys: bearer keys for automation, such as Terraform, a CI job or a SIEM, to call the admin API.

Create a key

The Create API key form: name terraform, permission Manage this organization, expires in 90 days.
FieldChoices
NameShown in the list and the audit log, for example terraform
CanManage this organization (Terraform, CI), or Read the audit log only for a SIEM or compliance tool
Expires in30, 90 or 180 days, or a year. Keys must expire

Copy the key from the dialog: only its hash is kept, and it is never shown again. Check it:

curl -H "Authorization: Bearer $CREDVANE_API_KEY" https://credvane.example.com/api/v1/admin/whoami

Use it

With Terraform:

export CREDVANE_BASE_URL=https://credvane.example.com
export CREDVANE_API_KEY=cat_...
terraform plan

In a pipeline that applies your configuration, kept as a CI secret:

# A CI job that applies the Terraform configuration on main
- name: Apply Credvane configuration
  env:
    CREDVANE_BASE_URL: https://credvane.example.com
    CREDVANE_API_KEY: ${{ secrets.CREDVANE_API_KEY }}
  run: terraform apply -auto-approve

Requests are limited per key, 300 a minute by default (CREDVANE_ADMIN_API_RATE_LIMIT_PER_MINUTE). A read-only key gets 403 from everything but the audit log.

Rotate and revoke

  • The list shows each key's status, expiry and last use. Admins get a notice 14 and 3 days before one expires.
  • To rotate, create a new key, switch the automation to it, then revoke the old one.
  • Revoke stops the key at once; it cannot be undone.

Terraform

API keys are not managed with Terraform: Terraform authenticates with one.