Last updated: February 16, 2026
What are API Keys?
API keys authenticate your AI coding agent with Detrics. When you register the Detrics MCP server with your agent, the API key is passed as an environment variable so the server can verify your identity and access your workspace data. Each API key is scoped to a workspace — it can only access data from the workspace where it was created.Keeping Your API Keys Safe
Managing API Keys
You can manage your API keys from the Detrics web app at app.detrics.io/mcp/api-keys.Generate a new key
- Go to any coding agent setup page or the API Keys page
- Click New Key
- Give the key a descriptive name (e.g., “Work laptop”, “CI server”)
- Copy the key immediately — it will only be shown once
Rename a key
- Open the API Keys page
- Click the menu icon next to the key
- Select Rename and enter a new name
Revoke a key
- Open the API Keys page
- Click the menu icon next to the key
- Select Revoke
- Confirm the revocation
Key Scoping
API keys are scoped to the workspace where they were created. This means:- A key created in “Agency Workspace A” can only access data from that workspace
- It cannot access data from “Agency Workspace B”, even if you’re a member of both
- If you work across multiple workspaces, you’ll need a separate key for each one
If Your Key Is Compromised
If you believe your API key has been exposed:- Revoke the key immediately from the API Keys page
- Generate a new key with a different name
- Update your coding agent with the new key by removing and re-adding the MCP server (see Setup Guide)
- Review your workspace activity for any unexpected usage