Authorization header as a Bearer token. Without a valid key, the API returns a 401 Unauthorized error.
Generating an API Key
Create a new API key from your Chevre workspace settings:1
Open API Key Settings
From your workspace dashboard, click Settings in the left sidebar, then select API Keys.
2
Create a New Key
Click + New Key in the top-right corner of the API Keys page.
3
Name and Scope Your Key
Enter a descriptive name for the key (for example,
Production Integration or CI Pipeline) and select the appropriate scope for what this key needs to do. See API Key Scopes below for details.4
Copy and Store the Key
Click Generate Key. Chevre displays the full API key once — copy it immediately and store it in a secure location such as a password manager or secrets vault. You won’t be able to view the key again after closing this dialog.
Making Authenticated Requests
Pass your API key in theAuthorization header using the Bearer scheme on every API request.
YOUR_API_KEY with the key you copied from Settings. Keep it out of your source code — use environment variables instead:
API Key Scopes
When generating a key, choose the scope that matches the minimum access your integration needs. Following the principle of least privilege reduces risk if a key is ever compromised.Rotating and Revoking Keys
Rotate keys regularly or immediately when you suspect exposure: To rotate a key:- Generate a new key with the same scope from Settings → API Keys → + New Key.
- Update your integration or environment variable to use the new key.
- Revoke the old key once you’ve confirmed the new one is working.
- Go to Settings → API Keys.
- Find the key you want to remove and click the ⋯ menu to its right.
- Select Revoke Key and confirm. Revocation is immediate — any request using the revoked key will receive a
401response.
Error Responses
If authentication fails, the API returns a standard error response. The two most common authentication-related errors are:
All error responses follow this JSON structure: