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
| Type | Prefix | Secret? | Scope | Expiry |
|---|---|---|---|---|
| Personal API key Admins control whether Members may create keys via the "Member API keys" setting; admins can always create them. | — | 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 Sent as Authorization: Bearer <ACCESS_TOKEN>. Revoke at https://api.linear.app/oauth/revoke. | — | 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
- Open Linear Settings → Account → Security & access.
- Create a new personal API key (if the option is hidden, an admin may have disabled Member API keys).
- Choose full access or limit permissions and teams; use only Read for read-only use.
- 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
- Create a new key with the same permissions and teams.
- Update the systems that use the old key.
- Revoke the old key.
Linear does not document an in-place rotate flow in the pages used.
How to revoke a Linear key
- Admins can view and revoke workspace API keys in Settings → Administration → API.
- For OAuth tokens, POST the token to
https://api.linear.app/oauth/revoke.
If your Linear key leaked
- Revoke the key immediately (an admin can do this in Settings → Administration → API).
- Create a replacement with the narrowest permissions and teams.
- Review recent issue and comment activity for the affected user.
Things that catch people out
- Personal API keys go in the
Authorizationheader with noBearerprefix; OAuth tokens do useBearer. 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/readonlyexposes 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:
| Intent | What BotPassword does |
|---|---|
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. |
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.