# Linear API keys: find, store, rotate, and use them safely with AI agents

Source: https://botpassword.com/keys/linear
Last checked: 2026-10-25

Linear personal API keys are created under Settings → Account → Security & access. A key can have full access or be limited to Read, Write, Admin, Create issues and Create comments, and restricted to specific teams. Send a personal API key as the whole `Authorization` header value, with no `Bearer` prefix.

## Key types

| Type | Prefix | Secret | Scope | Expiry |
|---|---|---|---|---|
| Personal API key | — | Yes | Full access to everything your user can access, or limited permissions (Read, Write, Admin, Create issues, Create comments) and optionally specific teams | Not documented in the pages used |
| OAuth access token | — | Yes | OAuth scopes such as read, write, issues:create, comments:create, admin | Client credentials tokens are valid for 30 days |

## How to create a Linear key

1. Open Linear **Settings** → **Account** → **Security & access**.
2. Create a new personal API key (if the option is hidden, an admin may have disabled Member API keys).
3. Choose full access or limit permissions and teams; use only Read for read-only use.
4. Copy the key and store it securely.

## Limiting what the key can do

When creating a key choose full access or limit it to Read, Write, Admin, Create issues and Create comments, and restrict it to particular teams. For agents that only need to look at issues, create a key with only Read enabled.

## How to rotate a Linear key

1. Create a new key with the same permissions and teams.
2. Update the systems that use the old key.
3. Revoke the old key.

## How to revoke a Linear key

1. Admins can view and revoke workspace API keys in **Settings** → **Administration** → **API**.
2. For OAuth tokens, POST the token to `https://api.linear.app/oauth/revoke`.

## If the key leaked

1. Revoke the key immediately (an admin can do this in **Settings** → **Administration** → **API**).
2. Create a replacement with the narrowest permissions and teams.
3. Review recent issue and comment activity for the affected user.

## Gotchas

- Personal API keys go in the `Authorization` header with no `Bearer` prefix; OAuth tokens do use `Bearer`. Mixing the formats fails.
- Linear recommends fetching a fresh client-credentials token each run rather than saving one as a long-lived key.
- The hosted MCP server uses OAuth by default but also accepts an API key or OAuth token as a bearer token; `https://mcp.linear.app/mcp/readonly` exposes only read tools.
- Admins may disable Member API keys in the workspace.

## Using this key with AI agents (BotPassword)

- `list_credentials`: Lists the credentials this agent is granted and what it may do with each. Never values.
- `request_access`: Asks you for a grant, which you approve with your master password or decline in BotPassword on your desktop, never in the chat. The agent gets a receipt, never a value. Approval on your phone is planned.
- `run_with`: Runs a command with the key injected as an environment variable or a 0600 temporary file, never on the command line, and redacts the key from the output.
- `http_request`: Makes an authenticated API call after checking the destination against the hosts this key may be sent to. The response comes back with credential-shaped values redacted, and one that holds the key itself is refused.
- `rotate`: Partly built: creates a new key, stores it as pending, verifies it, promotes it, then revokes the old key after a grace period. Today it works for Cloudflare tokens and AWS IAM keys you have set up, and an agent can start it only under a grant with autopilot; other providers cannot be rotated through their API yet.
- `capture_secret`: Planned, not built yet: will read a newly created key straight from the page or command output into the vault.
- `store_secret`: Saves a value the agent already holds as a new vault item.

## FAQ

### Where do I create a Linear API key?

At **Settings** → **Account** → **Security & access** (`linear.app/settings/account/security`).

### How do I send a Linear API key?

Put the key as the entire `Authorization` header value with no `Bearer` prefix. OAuth tokens use `Authorization: Bearer <ACCESS_TOKEN>`.

### Can I make a read-only Linear API key?

Yes. Create a key with only the Read permission enabled.

### Can I use a Linear API key with the Linear MCP server?

Yes. Send it as a bearer token to `https://mcp.linear.app/mcp`, or use the interactive OAuth flow most clients use.

### Can an AI agent use my Linear key without seeing it?

Yes, if the key never enters the agent's context. Instead of pasting the key into a chat or leaving it in a `.env` file the agent can read, keep it in a credential broker that injects it into the command or request on the agent's behalf. BotPassword does this with `list_credentials`, `run_with`, `http_request`, so the agent gets the result and never the value.

## Sources

- https://linear.app/developers/graphql
- https://linear.app/docs/api-and-webhooks
- https://linear.app/developers/oauth-2-0-authentication
- https://linear.app/docs/mcp
