Linear (API key)
Prefer a key to a sign-in? Connect Linear with a personal API key and your agent gets the same issue operations, each write counted against a daily limit and read back from Linear.
- host
- api.linear.app
- connect
- API key, per user
Create issue
linear-key-create-issue
Update issue
linear-key-update-issue
Assign issue
linear-key-assign-issue
Move issue
linear-key-move-issue
Reads and writes in Linear (API key). Writes are off until you switch them on.
Each one is a named operation from the pack. Reads change nothing.
Writes
Create issue
read backlinear-key-create-issue
Create one issue in a team, with a title and optionally a markdown description, priority, assignee, state, labels and due date. Returns its id, identifier and url.
Update issue
read backlinear-key-update-issue
Update one issue's title, description, priority or due date. Give at least one; the fields you leave out do not change.
Assign issue
read backlinear-key-assign-issue
Assign one issue to a user.
Move issue
read backlinear-key-move-issue
Move one issue to another workflow state of its team, such as In Progress or Done.
Add issue label
read backlinear-key-add-issue-label
Add one label to an issue, keeping its other labels.
Remove issue label
read backlinear-key-remove-issue-label
Remove one label from an issue, keeping its other labels.
Add comment
read backlinear-key-add-comment
Add one comment, in markdown, to an issue. Linear notifies the issue's subscribers and anyone mentioned. Returns the comment's id and url.
Archive issue
read backlinear-key-archive-issue
Archive one issue. It leaves the team's views and lists, and can be restored in Linear.
Reads
List teams
linear-key-list-teams
List the teams whose issues the key's user can see. Returns 50 a page, each with id, key (the prefix of issue identifiers, such as ENG) and name. When pageInfo.hasNextPage is true, pass pageInfo.endCursor as after. A GraphQL query that changes nothing.
List workflow states
linear-key-list-workflow-states
List one team's workflow states (its issue statuses), 50 a page. Each has id, name, type (triage, backlog, unstarted, started, completed, canceled or duplicate) and position. Use a state's id with move-issue or in a list-issues filter. A GraphQL query that changes nothing.
List labels
linear-key-list-labels
List the issue labels the key's user can see, of the workspace and of every team, 50 a page. Each has id, name, whether it is a group, and its team (null for a workspace label). A team label can be added to issues of that team. A GraphQL query that changes nothing.
List issues
linear-key-list-issues
List issues, 25 a page, ordered by creation time, or by last update when order_by is updatedAt. Filter by team, state (by id or type), assignee (by id, the key's own user, or unassigned), label, priority, title text and last update. Each issue has id, identifier, title, priority, url, due date, state, team, assignee and up to 10 labels; descriptions are left out, use get-issue. Archived issues are left out. When pageInfo.hasNextPage is true, pass pageInfo.endCursor as after. A GraphQL query that changes nothing.
Search issues
linear-key-search-issues
Search issues by text in their title and description, and in their comments when include_comments is true. Returns 25 a page, ranked by relevance, with the same fields as list-issues and the same filter. team_id ranks one team's issues higher; it does not filter (use filter.team for that). Linear rate-limits this search more tightly than other queries (30 a minute by its schema). When pageInfo.hasNextPage is true, pass pageInfo.endCursor as after. A GraphQL query that changes nothing.
Get issue
linear-key-get-issue
Get one issue by id or identifier (ENG-123): title, description (markdown), priority, url, due date, estimate, state, team, assignee, creator, project, parent, labels (up to 50) and when it was created, updated, completed or archived. A GraphQL query that changes nothing.
List issue comments
linear-key-list-issue-comments
List the comments on one issue, 20 a page, in the order they were made. Each has id, body (markdown), author, when it was created and edited, and the comment it replies to. When pageInfo.hasNextPage is true, pass pageInfo.endCursor as after. A GraphQL query that changes nothing.
How do users connect? Each one brings their own Linear (API key).
- 1.Call for the userYour server invokes the action for the signed-in user. Without a Linear (API key) connection, the SDK throws EndUserNotConnectedError with a connect link.
- 2.The user pastes a keyThe link opens a form that shows where in Linear (API key)'s settings to create the key. The link lasts 10 minutes and works once.
- 3.Anlyon checks itThe key is checked with Linear (API key) before it is kept, and bound to api.linear.app. It is never shown back.
- 4.Your server confirmsYour server confirms the connection for the user who is signed in, and the call goes through.
Guardrails. Suggested limits and approvals, for you to review.
Suggested limits
- 50 issues created a day
- 200 issues updated a day
- 100 issues assigned a day
- 200 issues moved a day
- 200 labels added a day
- 100 labels removed a day
- 200 comments a day
- 20 issues archived a day
Suggested approvals
- A person approves archiving an issue
What the key must allow
- A personal API key you create
- Read and write access to the teams your agent works in
- It acts as you, so create it from an account in those teams
Good to know
- Linear answers most errors with a success status, so the read-back is what tells a change from a refusal.
- A key and a sign-in use different packs, because Linear expects each in its own form.
For your own account
- 1.In Linear, open Settings, Security and access, Personal API keys, and create a key.
- 2.Give it read and write access to the teams your agent should reach.
- 3.In Anlyon, open Actions, then Integrations, choose Linear (API key) and paste the key.
- 4.Anlyon checks the key with Linear before storing it. It becomes a secret named LINEAR_KEY, bound to api.linear.app.
Linear (API key) in your code. For one of your users, or for your own account.
Act for one of your users from your server, or connect your company's own Linear (API key) with the CLI.
import { Client, EndUserNotConnectedError } from "@anlyonhq/sdk";const anlyon = new Client({ apiKey: process.env.ANLYON_API_KEY! });try { const { data } = await anlyon .forUser(session.userId) .actions.invoke("linear-key-create-issue", { team_id: "9cfb482a-81e3-4154-b5b9-2c805e70a02d", title: "Checkout fails for saved cards" }); return { status: "done", grade: data.grade };} catch (error) { if (error instanceof EndUserNotConnectedError) { // The user connects their own Linear (API key), then you call again. return { status: "connect_required", url: error.connectUrl }; } throw error;}Other integrations. Under the same limits, approvals and receipts.
Available
Stripe
Payments · API key
Refunds under a money ceiling, and every customer, payment and invoice to read.
Available
GitHub
Code · API key
Issues, pull requests and code, in the repositories you choose.
Available
HubSpot
CRM · Sign in
Contacts, companies and deals: search them and change them.
- Anlyon app
- Available
- Your own app
- Recommended for production
