Managing API Keys
Last updated 2026-03-13
Creating an API Key
API keys are used to authenticate external tools like Cursor, Claude Desktop, and VS Code with your CodeContext account. To create a new key:
- Go to Settings > API Keys in your dashboard.
- Click Create New Key.
- Give your key a descriptive name (e.g., "Cursor - Work Laptop").
- Copy the key immediately — it will only be shown once.
Store your API key in a safe place. Treat it like a password.
Viewing Your Keys
The API Keys page shows all your active keys with their names, creation dates, and last used dates. For security, the full key value is never displayed after creation — only the last four characters are shown.
Changing Permission Levels
Admins and owners can change an API key's access level between Read Only and Read & Write at any time. To change a key's permission:
- Settings > API Keys — Admins and owners can change the permission of any key in the organization using the dropdown next to each key.
- Connect page — Admins and owners can change the permission of their own keys from the Connect page.
Members cannot change key permissions — their keys are always set to Read Only. The change takes effect immediately for all future requests using that key.
Rotating a Key
If you suspect a key has been compromised or just want to follow good security practices, you can rotate it. Rotating creates a new key and immediately disables the old one. Make sure to update the key in all tools that were using it.
Revoking a Key
To revoke a key, click the "Revoke" button next to it on the API Keys page. Revoked keys stop working immediately. Any tools using that key will lose access until you update them with a new key.
We recommend revoking keys that are no longer in use and rotating keys periodically for security.
Related Articles
Still need help?
Our support team is happy to help with any questions you may have.
support@codecontext.app