Skip to main content

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

  1. Create an HTTPS endpoint that accepts JSON POST requests.
  2. In TARGPatrol, open Webhooks and add the endpoint URL.
  3. Select the event types the endpoint should receive.
  4. 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 typeTriggerOperation
INCIDENT_CREATEDAn Incident is createdINSERT
INCIDENT_EDITEDGeneral Incident details changeUPDATE
INCIDENT_PRIORITY_CHANGEDIncident priority changesUPDATE
INCIDENT_STATE_CHANGEDA workflow transition changes the stateUPDATE

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": {}
}
}
FieldDescription
entityIdIncident UUID
typeOne of the four Incident event types
createdAtEvent creation time in ISO 8601 format
data.operationINSERT for creation or UPDATE for later changes
data.currentComplete Incident snapshot after the change
data.previousComplete snapshot before the change; null for creation

Incident snapshot fields

Both current and previous use the same immutable snapshot contract:

FieldType
id, organizationIdUUID
namestring
descriptionstring or null
typeId, categoryId, stateIdUUID
priorityMINOR, NORMAL, MAJOR, or CRITICAL
locationIdUUID
pointId, assigneeIdUUID or null
occurredAtISO 8601 date-time
mediaIdsUUID[]
tagsstring[]
clientRequestIdUUID
latitude, longitudenumber or null
externalIdstring or null
createdBy, lastModifiedByUUID
createdAt, lastModifiedAtISO 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.