---
title: "Linear Webhook"
method: POST
path: "/api/linear-webhook"
---

# Linear Webhook

`POST /api/linear-webhook`

## Request

- Base URL: `https://api.deeptrace.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.deeptrace.com/api/linear-webhook`
- Auth: none declared

Webhook endpoint for Linear events.

Handles:
- OAuthAuthorization revoked events: When Deeptrace integration is revoked, removes
  linear_oauth_token_id and linear-mcp from team config.
- Issue create/update events: Triggers investigations when configured (feature-flagged).
- AgentSessionEvent: Chat-style responses when @Deeptrace is mentioned, using
  Linear's Agent Interaction protocol (AgentActivity mutations).
- Comment events: Ignored (agent mentions use AgentSessionEvent instead).

Linear webhook payload structure:
{
   "action": "create" | "update" | "revoked" | "created" | "prompted",
   "type": "Issue" | "Comment" | "OAuthAuthorization" | "AgentSessionEvent",
   "organizationId": "...",
   "data": { ... }  // for Issue/Comment
   "agentSession": { ... }  // for AgentSessionEvent
}

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/deeptrace/apis/deeptrace-api.md) - [All operations](https://skmtc.dev/deeptrace/apis/deeptrace-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deeptrace/apis/deeptrace-api/revisions/855e59bb07f0?raw)
