Skip to main content
Chevre uses API keys to authenticate requests to the Chevre REST API. Every request you make must include your API key in the 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.
Treat your API key like a password. Never commit it to source control, paste it into public forums, or share it in plain text. If a key is ever exposed, revoke it immediately and generate a new one.

Making Authenticated Requests

Pass your API key in the Authorization header using the Bearer scheme on every API request.
Replace 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:
  1. Generate a new key with the same scope from Settings → API Keys → + New Key.
  2. Update your integration or environment variable to use the new key.
  3. Revoke the old key once you’ve confirmed the new one is working.
To revoke a key:
  1. Go to Settings → API Keys.
  2. Find the key you want to remove and click the menu to its right.
  3. Select Revoke Key and confirm. Revocation is immediate — any request using the revoked key will receive a 401 response.
Revoking a key is permanent and cannot be undone. Make sure all services using the key have been updated before revoking it.

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:
For the full API authentication reference — including OAuth 2.0 token flows for user-delegated access — see the API Authentication Reference.