Developer tools

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

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.

Linear key types

TypePrefixSecret?ScopeExpiry
Personal API key
Admins control whether Members may create keys via the "Member API keys" setting; admins can always create them.
—YesFull access to everything your user can access, or limited permissions (Read, Write, Admin, Create issues, Create comments) and optionally specific teamsNot documented in the pages used
OAuth access token
Sent as Authorization: Bearer <ACCESS_TOKEN>. Revoke at https://api.linear.app/oauth/revoke.
—YesOAuth scopes such as read, write, issues:create, comments:create, adminClient 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.

Open Linear's key settings

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.

Linear does not document an in-place rotate flow in the pages used.

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 your Linear 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.

Things that catch people out

  • 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 your Linear key with AI agents

A coding agent that can read your .env file or your shell history can read the key, and anything in its context can end up in logs, transcripts or a prompt-injected request. The safer pattern is to keep the key in a credential broker that performs the authenticated step for the agent and hands back only the result.

BotPassword works this way. For a Linear key, these intents fit:

IntentWhat BotPassword does
list_credentialsLists the credentials this agent is granted and what it may do with each. Never values.
request_accessAsks 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_withRuns 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_requestMakes 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.
rotatePartly 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_secretPlanned, not built yet: will read a newly created key straight from the page or command output into the vault.
store_secretSaves a value the agent already holds as a new vault item.

Linear also publishes its own MCP server. Whatever server the agent uses, keep the credential it authenticates with out of the agent's context.

Set it up in your agent: Aider · Amp · Claude Code · Claude Desktop · Cline · OpenAI Codex CLI · all agents

Frequently asked questions

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.

Stop pasting Linear keys into agents

BotPassword is in early access. Request an invite and we'll email you when your spot opens.