Webhooks
TARGPatrol webhooks send an HTTP POST request to your endpoint when a subscribed event occurs. Use them to synchronize external systems without polling the External API.
Configure a webhook
- Create an HTTPS endpoint that accepts JSON
POSTrequests. - In TARGPatrol, open Webhooks and add the endpoint URL.
- Select the event types the endpoint should receive.
- Save the webhook and trigger a subscribed event to verify your integration.
Return a successful 2xx response promptly. Process payloads idempotently so a repeated delivery does not create duplicate work.
Incident events
Workflow-based Incidents have four organization-level webhook events:
| Event type | Trigger | Operation |
|---|---|---|
INCIDENT_CREATED | An Incident is created | INSERT |
INCIDENT_EDITED | General Incident details change | UPDATE |
INCIDENT_PRIORITY_CHANGED | Incident priority changes | UPDATE |
INCIDENT_STATE_CHANGED | A workflow transition changes the state | UPDATE |
INCIDENT_EDITED covers changes to name, description, typeId, categoryId, locationId, pointId, assigneeId, occurredAt, tags, externalId, latitude, or longitude.
Priority and workflow state changes use their own event types. One API update can therefore produce both INCIDENT_EDITED and INCIDENT_PRIORITY_CHANGED when it changes both kinds of data.
Attachment-only changes do not currently emit an Incident webhook. The current mediaIds collection is still included in snapshots produced by later supported Incident events.
Incident comments use the separate COMMENT_CREATED webhook event; they do not emit
INCIDENT_EDITED.
The legacy ISSUE_CREATED and ISSUE_EDITED events remain available for legacy Issue records. They are separate from the new Incident events.
Incident payload envelope
{
"entityId": "4adbc000-3095-42f3-bddd-d8a1da1ab2bd",
"type": "INCIDENT_EDITED",
"createdAt": "2026-08-13T10:15:00.000Z",
"data": {
"operation": "UPDATE",
"current": {},
"previous": {}
}
}
| Field | Description |
|---|---|
entityId | Incident UUID |
type | One of the four Incident event types |
createdAt | Event creation time in ISO 8601 format |
data.operation | INSERT for creation or UPDATE for later changes |
data.current | Complete Incident snapshot after the change |
data.previous | Complete snapshot before the change; null for creation |
Incident snapshot fields
Both current and previous use the same immutable snapshot contract:
| Field | Type |
|---|---|
id, organizationId | UUID |
name | string |
description | string or null |
typeId, categoryId, stateId | UUID |
priority | MINOR, NORMAL, MAJOR, or CRITICAL |
locationId | UUID |
pointId, assigneeId | UUID or null |
occurredAt | ISO 8601 date-time |
mediaIds | UUID[] |
tags | string[] |
clientRequestId | UUID |
latitude, longitude | number or null |
externalId | string or null |
createdBy, lastModifiedBy | UUID |
createdAt, lastModifiedAt | ISO 8601 date-time |
Use current as the authoritative value after the event. Compare it with previous when you need the exact field-level change.
Incident webhook deliveries do not contain a top-level userId. Use current.createdBy for the
original reporter and current.lastModifiedBy for the user recorded for the latest Incident
change.
Incident webhook examples
For the UI setup guide, see How to create and set up webhooks in TARGPatrol.