Access tokens are how external clients authenticate to Infracodebase: AI agents in your IDE, CI pipelines, scheduled jobs, and any custom integration. Every token is sent as a Bearer credential against the same /api/... endpoints the web app uses, so anything you can do in the UI you can do with a token.
There are two types of tokens, and they're shaped for different jobs.
Personal access tokens belong to a single user and carry that user's permissions. Use them when you want to act from another tool, like connecting Claude Code, Cursor, or Claude Desktop to your workspaces, or running a script from your laptop. They're the right default for IDE integrations.
Enterprise access tokens belong to the enterprise itself, not a person. They carry a configurable subset of permissions chosen at creation time, and can be scoped to all or a specific set of workspaces. Use them for CI pipelines, scheduled jobs, and automations that should outlive any individual's membership. They keep working when a member leaves the enterprise; a personal token doesn't.
| Personal | Enterprise | |
|---|---|---|
| Prefix | icb_pat_ | icb_eat_ |
| Authority | The owning user's permissions | A configured subset, capped by the creator's permissions |
| Reach | All enterprises and workspaces the user can access | One enterprise; all or selected workspaces |
| Created at | Account settings → Access Tokens | Enterprise settings → Tokens |
| Survives member removal | No | Yes |
| Best for | IDE / MCP / personal scripts | CI / automation / service accounts |
Open Access Tokens in your account settings and click Create token. You'll be asked for:
read lets the token call read-only tools and endpoints. execute adds write access like creating workspaces, linking repos, and updating attached resources.The token value (starting icb_pat_...) is shown once at creation. Copy it immediately. Infracodebase only stores a hash of it, so if you lose the value you'll have to create a new token. There's no "show again."
Open Tokens in your enterprise settings and click Create token. You need the Manage enterprise access tokens permission (enterprise.tokens.manage) to create or revoke tokens.
You'll be asked for:
The token value (starting icb_eat_...) is shown once, at creation. Copy it immediately.
Three rules apply to the permissions a token can carry. They protect against a token quietly granting more authority than its creator has.
enterprise.secrets.manage, you cannot mint a token that has it.enterprise.tokens.manage or enterprise.tokens.view. Otherwise a token could mint or inspect other tokens.enterprise.delete or enterprise.members.roles.assign. The second prevents a privilege-escalation path where a token holder could grant themselves Owner.Tokens are immutable after creation. To change what a token can do, revoke it and create a new one.
Enterprise tokens are owned by the enterprise, not the user who created them. If that user is removed from the enterprise or leaves the company, their enterprise tokens keep working. The audit log preserves who originally created each one, so you have a clean record even after the creator is gone.
Send the token as a Bearer credential on the Authorization header.
Authorization: Bearer icb_pat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The same header works against the MCP server and the REST API. Both token types are accepted on both surfaces, and the server picks the right verification path from the prefix.
A common pattern for CI:
curl -s https://app.example.com/api/enterprises/$ENTERPRISE_ID/workspaces \
-H "Authorization: Bearer $INFRACODEBASE_TOKEN"
Store tokens in your CI provider's secret manager. Never commit them to source control.
Each token has a Revoke action in its manager. Revocation takes effect immediately. The next request from that token returns 401 Unauthorized. There is no grace period.
To rotate a token:
Tokens you haven't used recently show a Last used timestamp in the manager. Empty Last used columns are a good place to start when cleaning up.
Last used timestamp so you can spot stale tokens.401 Unauthorized: token is missing, malformed, revoked, or expired. Check that the Authorization header starts with Bearer icb_pat_ or Bearer icb_eat_.403 Insufficient permissions: the token's permissions don't include the action you're calling. For enterprise tokens, open the token in the manager and confirm the permission is stamped on it.429 Too Many Requests: exceeded the per-token rate limit. Back off and retry.