Skip to main content
Every Chevre API request must be authenticated using an API key. API keys are workspace-scoped and must be passed in the Authorization header as a Bearer token. Without a valid key, all requests return a 401 Unauthorized response.

Generating an API Key

1

Open API Keys settings

Navigate to Settings → API Keys in your Chevre dashboard.
2

Create a new key

Click New Key, enter a descriptive name (e.g., production-integration), and choose the appropriate scope for your use case.
3

Copy and store the key

Copy the key immediately and store it somewhere secure — a secrets manager or environment variable. Chevre will never display the full key again after you close this dialog.
Your API key is shown only once at the moment of creation. If you lose it, you must rotate or revoke the key and generate a new one. There is no way to retrieve the original value.

Authenticating Requests

Pass your API key as a Bearer token in the Authorization header of every request:
The following examples show authenticated requests across common HTTP clients:

API Key Scopes

When you create a key, you assign it a scope that controls what actions it can perform. Always use the most restrictive scope that your integration actually needs.

Rotating a Key

Rotate a key to issue a new secret value while keeping the same key name and scope. Use this as part of a regular security rotation policy or if you suspect a key has been exposed. Navigate to Settings → API Keys → (key name) → Rotate.
The old key stops working immediately when you rotate it. Update all services and environment variables with the new key before rotating to avoid downtime.

Revoking a Key

To permanently delete a key and prevent any further use, navigate to Settings → API Keys → (key name) → Revoke. Revocation is immediate and cannot be undone.

Authentication Errors

New to Chevre? See the Quick Setup Guide for a step-by-step walkthrough of creating your first API key and making your first authenticated request.