Skip to main content

Incident API overview

The Incident API is the workflow-based replacement for the legacy Issue API. It supports configurable creation forms, custom states and transitions, transition history, tags, coordinates, external identifiers, comments, and attachments.

The legacy /issues endpoints remain documented separately for existing integrations. New integrations should use /incidents.

Base URL and authorization

https://api.targpatrol.com/api/v1

Every request requires an organization External API key:

x-api-key: {your_external_api_key}

The Incident and Comment endpoints described here are part of External API contract version 1.3.

External API keys are evaluated with the OWNER role. TARGPatrol controls authorship and audit fields; public requests cannot override them.

Endpoints

MethodEndpointPurpose
GET/incidentsList and filter Incidents
POST/incidentsCreate an Incident idempotently
GET/incidents/creation-configurationRead effective creation fields, defaults, priorities, Types, and Categories
GET/incidents/{id}Get one Incident
PATCH/incidents/{id}Update editable Incident fields
GET/incidents/{id}/available-transitionsList transitions available from the current state
POST/incidents/{id}/transitionsExecute a workflow transition
GET/incidents/{id}/transition-historyRead transition history
GET/upload/temp/incidents/media/urlsGenerate a temporary attachment upload URL
GET/upload/incidents/{incidentId}/media/urlsGenerate an upload URL for an existing Incident
POST/incidents/{incidentId}/mediaAttach uploaded files
POST/incidents/{incidentId}/media/deleteDelete attachments
GET/download/incidents/{incidentId}/media/{mediaId}/urlsGenerate attachment download URLs
GET, POST/comments/by-entity-type/incidentList or create Incident comments
PATCH, DELETE/comments/{commentId}Update or delete an External API-authored comment
GET/download/comments/{commentId}/media/{mediaId}/urlsGenerate Comment attachment download URLs

Incident response

Incident endpoints return an IncidentResponse object directly or inside a paginated data array.

FieldTypeNotes
idUUIDIncident identifier
namestringShort title
descriptionstring or nullDetailed report
typeIdUUIDIncident Type
categoryIdUUIDCategory belonging to typeId
stateIdUUIDCurrent workflow state
priorityenumMINOR, NORMAL, MAJOR, or CRITICAL
locationIdUUIDRelated Location
pointIdUUID or nullPoint belonging to the Location
assigneeIdUUID or nullAssigned user
occurredAtdate-timeWhen the Incident occurred
mediaIdsUUID[]Attached media; maximum 10
tagsstring[]Unique Incident tags
clientRequestIdUUIDImmutable client idempotency key
creationConfigVersioninteger or nullCreation configuration revision used to validate and normalize the Incident
latitudenumber or nullRange -90 to 90; supplied with longitude
longitudenumber or nullRange -180 to 180; supplied with latitude
externalIdstring or nullIdentifier in an integrated system
createdBy, lastModifiedByUUIDAudit user identifiers
createdAt, lastModifiedAtdate-timeAudit timestamps

Example response

{
"id": "4adbc000-3095-42f3-bddd-d8a1da1ab2bd",
"name": "Broken lobby window",
"description": "Window next to the main entrance is cracked.",
"typeId": "b419c511-a4ac-4904-b836-632b3fd6d9a4",
"categoryId": "ca284c13-10bc-4318-9ca2-e77705512425",
"stateId": "1e86aa2d-717a-46db-a73b-c760fb44869d",
"priority": "MAJOR",
"locationId": "20553a15-51df-4266-88c2-1067c2d1f0e8",
"pointId": null,
"assigneeId": "a60b0a09-344f-4232-80dc-9a039cdd5934",
"occurredAt": "2026-08-13T09:30:00.000Z",
"mediaIds": [],
"tags": ["safety", "broken-window"],
"clientRequestId": "91000000-0000-0000-0000-000000000001",
"creationConfigVersion": 7,
"latitude": 53.9023,
"longitude": 27.5619,
"externalId": "FACILITY-2041",
"createdBy": "b4b48940-d927-4d93-8a69-9e1a32ee96ca",
"createdAt": "2026-08-13T09:35:00.000Z",
"lastModifiedBy": "b4b48940-d927-4d93-8a69-9e1a32ee96ca",
"lastModifiedAt": "2026-08-13T09:35:00.000Z"
}