# Linear integration

Source: https://pinprompt.veren-technology.com/docs/reference/linear

Connects a pinprompt project to one **Linear team**, so items become Linear issues there, and status and comments sync both ways. It works with any Linear workspace. Like every integration it follows the activity log: turning it off changes nothing else, and nothing in Linear ever closes an item (people sign off in pinprompt).

**Status: Experimental**, in the next release (after 0.4.5). Tested end to end against a stand-in Linear API; not yet connected to a real Linear workspace. Try it on a test project first.

## What you need

A **personal API key** from someone in the Linear workspace: **Linear → Settings → Security & access → Personal API keys → New key**. Give it full access, or *Read* and *Write*, plus *Admin* so pinprompt can make the webhook that brings changes back. Only Linear admins can make webhooks: with a non-admin key everything still goes to Linear, but status changes and comments in Linear don't come back until an admin connects (the card says so).

pinprompt acts in Linear as the key's owner: issues and comments from pinprompt show their name. When the key is revoked, connect again with a new one.

No server setup is needed.

## Per project

![Connect Linear: the API key, then the team](https://pinprompt.veren-technology.com/docs-shots/linear-connect.jpg)

Owner or developer: **Settings → Integrations → Connect Linear**. Paste the key, then pick the team. Optionally switch on *Create a Linear issue for every agent-ready item*; otherwise issues are made only when someone asks on an item. **Change** takes a new key or another team; the item links stay. The key and the webhook's secret only change this way (pinprompt checks a new key with Linear first), never through the generic settings API.

![The connected card on Settings → Integrations](https://pinprompt.veren-technology.com/docs-shots/linear-connected.jpg)

The card shows **one way only** when the webhook couldn't be made, with Linear's reason and **Try again**.

## What syncs

![An item with its Linear issue ENG-1, In Review](https://pinprompt.veren-technology.com/docs-shots/linear-item.jpg)

| pinprompt | Linear |
|---|---|
| **Create Linear issue** on an item (or, with the switch on, every agent-ready item) | An issue in the team, `[FB-12] Title`, with the spec as its description, the screenshots and reference images (uploaded to Linear, so only your workspace sees them), and a link back to the item |
| **Link** with `ENG-123` or the issue's link | Checked in Linear (it must be in the connected team), then linked. One item per issue |
| Spec revised | Title and description updated |
| An agent takes it (With agent) | A *started* state (In Progress, when the team has it), only from a not-yet-started one |
| Done / Won't fix / Merged | A comment, then a *completed* state (Done); a *canceled* one for won't fix, when the team has it |
| A person's or agent's comment | A comment "**Mia** commented on FB-12 in pinprompt:" |

| Linear | pinprompt |
|---|---|
| Status change | The link shows the status, and a line "ENG-12 moved to In Review in Linear by Ana" |
| Comment | On the item as "Ana Silva (Linear)", unless pinprompt posted it |
| Issue deleted | The link is marked deleted; **Create Linear issue** makes a new one |

The same privacy rules as the other trackers: on an item a client reads, internal notes never go, and a client's own comments go only with **Client comments** on. A comment that came in from another tracker (Jira, GitHub, …) is never sent on to Linear.

**Agents** need nothing new: they work items over MCP as before, and the item's links include the Linear issue.

## Security

- The key is stored encrypted with `PINPROMPT_SECRET_KEY` and never shown again.
- Linear calls `<base>/api/hooks/tracker/linear/<integration id>`. Each call is signed (`Linear-Signature`, HMAC-SHA256 of the body with a secret pinprompt generated for this connection); anything else gets 401. Calls older than five minutes and repeats are refused, and only items of the connected project are touched.
- `PINPROMPT_LINEAR_API` points pinprompt at another Linear API base (tests and local runs use a stand-in). Leave it unset in production.

## Disconnecting

**Disconnect** forgets the key. Issues stay in Linear and items keep their links. Remove pinprompt's webhook in **Linear → Settings → API → Webhooks**; until then its calls get 401 and Linear turns it off.

## Not built yet

- Signing in with Linear (OAuth) instead of a personal key.
- Labels, assignees, priority and projects on the issue: it goes to the team's default state with no labels.
- Making issues from items that were already agent ready when you switched mirroring on.
