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

# Linear Webhook

`POST /api/linear-webhook`

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.net/deeptrace/apis/fastapi.md) · [All operations](https://skmtc.net/deeptrace/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeptrace/fastapi/versions/2e2a6de8aeda/schema)
