Skip to content
briefkastencloud

Linear

Workspace webhooks, verified with Linear-Signature and a timestamp window.

Set it up

  1. In Linear, open Settings → API → Webhooks → New webhook.
  2. URL: the source's hook URL. Choose the data types: issues and, for an agent, agent session events.
  3. Linear shows the signing secret. Pass it when you add the source:
briefkasten source add linear --project acme-shop --secret lin_wh_…

Signature

Linear signs the raw body with HMAC-SHA256, hex, in Linear-Signature. The payload's webhookTimestamp must be within five minutes of now, so a captured delivery can't be replayed later.

Events

EventFromBodyTarget
issuean Issue delivery: create, update, removeaction, id, identifier, title, team, createdAt, deliverythe issue's identifier, e.g. DEV-42
agent_sessionan AgentSessionEvent: created when an agent is mentioned or delegated to, prompted for every follow-upaction, homeId (the session), identifier, title, description, url, team, prompt, actor, creator, atthe issue's identifier

Other data types (comments, projects, …) are verified and acknowledged, and make no event. The samples below are the deliveries Linear posts.

Issue.createAn issue was createdevent issuetarget DEV-42
{
  "action": "create",
  "type": "Issue",
  "createdAt": "2026-12-04T12:00:00.000Z",
  "organizationId": "4d1c9a2b-8e7f-4a6b-b3c2-1d0e9f8a7b6c",
  "webhookId": "0c6b1f84-3d2e-4a59-8f71-62e9d0c5b4a3",
  "webhookTimestamp": 1796385600000,
  "url": "https://linear.app/acme/issue/DEV-42",
  "actor": {
    "id": "a7c3e1f9-2b4d-4c6e-8a0b-9d1f3e5a7c2b",
    "name": "Alex Example",
    "type": "user"
  },
  "data": {
    "id": "8f3b2c1e-6a4d-4b0e-9f1a-2c7d5e8b9a01",
    "identifier": "DEV-42",
    "title": "Letterbox jams on Mondays",
    "url": "https://linear.app/acme/issue/DEV-42",
    "team": {
      "id": "f1e2d3c4-b5a6-4789-9abc-def012345678",
      "key": "DEV",
      "name": "Development"
    },
    "description": "Since Monday the slot jams after ten letters.",
    "priority": 2,
    "state": {
      "name": "Todo",
      "type": "unstarted"
    },
    "createdAt": "2026-12-04T12:00:00.000Z"
  }
}
Issue.updateAn issue moved to In Progressevent issuetarget DEV-42
{
  "action": "update",
  "type": "Issue",
  "createdAt": "2026-12-04T12:00:00.000Z",
  "organizationId": "4d1c9a2b-8e7f-4a6b-b3c2-1d0e9f8a7b6c",
  "webhookId": "0c6b1f84-3d2e-4a59-8f71-62e9d0c5b4a3",
  "webhookTimestamp": 1796385600000,
  "url": "https://linear.app/acme/issue/DEV-42",
  "actor": {
    "id": "a7c3e1f9-2b4d-4c6e-8a0b-9d1f3e5a7c2b",
    "name": "Alex Example",
    "type": "user"
  },
  "data": {
    "id": "8f3b2c1e-6a4d-4b0e-9f1a-2c7d5e8b9a01",
    "identifier": "DEV-42",
    "title": "Letterbox jams on Mondays",
    "url": "https://linear.app/acme/issue/DEV-42",
    "team": {
      "id": "f1e2d3c4-b5a6-4789-9abc-def012345678",
      "key": "DEV",
      "name": "Development"
    },
    "priority": 2,
    "state": {
      "name": "In Progress",
      "type": "started"
    },
    "updatedAt": "2026-12-04T12:00:00.000Z"
  },
  "updatedFrom": {
    "stateId": "3e1a9c7b-5d2f-4e8a-b6c0-1f9d7e3a5c8b"
  }
}
AgentSessionEvent.createdAn agent was mentioned on an issueevent agent_sessiontarget DEV-42
{
  "action": "created",
  "type": "AgentSessionEvent",
  "createdAt": "2026-12-04T12:00:00.000Z",
  "organizationId": "4d1c9a2b-8e7f-4a6b-b3c2-1d0e9f8a7b6c",
  "webhookId": "0c6b1f84-3d2e-4a59-8f71-62e9d0c5b4a3",
  "webhookTimestamp": 1796385600000,
  "url": "https://linear.app/acme/issue/DEV-42",
  "actor": {
    "id": "a7c3e1f9-2b4d-4c6e-8a0b-9d1f3e5a7c2b",
    "name": "Alex Example",
    "type": "user"
  },
  "agentSession": {
    "id": "5b7d9f1a-3c5e-4a7c-9e1b-3d5f7a9c1e3b",
    "status": "pending",
    "issue": {
      "id": "8f3b2c1e-6a4d-4b0e-9f1a-2c7d5e8b9a01",
      "identifier": "DEV-42",
      "title": "Letterbox jams on Mondays",
      "url": "https://linear.app/acme/issue/DEV-42",
      "team": {
        "id": "f1e2d3c4-b5a6-4789-9abc-def012345678",
        "key": "DEV",
        "name": "Development"
      }
    },
    "comment": {
      "id": "c2d4f6a8-1b3e-4d5f-a7c9-e1f3a5c7e9b1",
      "body": "@acme-bot please take this one"
    },
    "createdAt": "2026-12-04T12:00:00.000Z"
  },
  "agentActivity": {
    "id": "e1f3a5c7-9b1d-4f3a-8c5e-7a9b1d3f5a7c",
    "content": {
      "type": "prompt",
      "body": "please take this one"
    }
  }
}

Options

None: the signing secret is all Linear needs.

In your app

import { linear } from "@briefkasten/adapter-linear";

const hooks = briefkasten({
  sources: { linear: linear({ secret: process.env.LINEAR_WEBHOOK_SECRET }) },
});

hooks.on("linear:issue", async (event) => {
  console.log(event.body.action, event.body.identifier);
});