Skip to main content
Trunk provides webhooks for you to build custom integrations to automate workflows, like notifying your team when a test becomes flaky or automatically creating tickets to investigate flaky tests. Trunk provides built-in connectors for Linear and Jira to automate ticket creation, and webhooks let you build custom integrations for use cases that are not supported out of the box.
For Merge Queue webhook events (pull_request.* and pull_request_batch.*), see the Merge Queue webhooks reference.
Svix powers webhooks for Trunk. You’ll be using Svix to configure webhooks and you should familiarize yourself with the Svix App Portal docs to learn more.

Supported Events

Trunk lets you create custom workflows with event-triggered webhooks. Flaky Tests events are named with a test_case prefix. You can find all the events that Trunk supports in the event catalog:

Webhook Events | trunk.io - Svix

Trunk publishes the following Flaky Tests event types to Svix. Each event includes a full JSON schema with field descriptions visible in the Svix app portal.

test_case.monitor_status_changed

Emitted when a monitor activates or resolves for a test case.

v2.test_case.status_changed

Emitted when a test case changes status (e.g., becomes flaky or is resolved), as triggered by a monitor.
The original test_case.status_changed event is being phased out in favor of v2.test_case.status_changed. v2 intentionally omits aggregate metrics like failure_rate_last_7d. To enrich a status-change webhook with current metrics, call flaky-tests/get-test-details from your webhook handler using the test_case.id from the payload.

test_case.quarantining_setting_changed

Emitted only when a quarantining setting is manually overridden to ALWAYS_QUARANTINE or NEVER_QUARANTINE. It does not fire when Trunk auto-quarantines a test based on flakiness — to react to auto-quarantine, listen to v2.test_case.status_changed and check new_status == "FLAKY". The full payload schema is available in the Svix event catalog linked above.

test_case.investigation_completed

Emitted when an AI-powered flaky test analysis finishes for a test case. Citations in markdown_summary and facts[].content are delivered as fully rendered links to the supporting evidence, so you can consume these fields directly without resolving placeholder tags. test_case.investigation_completed fires only when an AI investigation finishes — it is not a general status-change signal. For “this test just became flaky” reactions (Linear ticket creation, Slack alerts, and so on), subscribe to v2.test_case.status_changed instead. Delivery reliability. If the webhook delivery provider rate-limits a request, Trunk automatically retries with exponential backoff, so a transient spike rarely drops an event. This applies to every Flaky Tests webhook event and needs no configuration on your side. You can also find guides for specific examples here:

Alert When a Test Escalates

Send a Slack Message

Create a GitHub Issue

Send a Microsoft Teams Message

Create a Linear Issue

Create a Jira Issue