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
| Method | Endpoint | Purpose |
|---|---|---|
GET | /incidents | List and filter Incidents |
POST | /incidents | Create an Incident idempotently |
GET | /incidents/creation-configuration | Read 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-transitions | List transitions available from the current state |
POST | /incidents/{id}/transitions | Execute a workflow transition |
GET | /incidents/{id}/transition-history | Read transition history |
GET | /upload/temp/incidents/media/urls | Generate a temporary attachment upload URL |
GET | /upload/incidents/{incidentId}/media/urls | Generate an upload URL for an existing Incident |
POST | /incidents/{incidentId}/media | Attach uploaded files |
POST | /incidents/{incidentId}/media/delete | Delete attachments |
GET | /download/incidents/{incidentId}/media/{mediaId}/urls | Generate attachment download URLs |
GET, POST | /comments/by-entity-type/incident | List or create Incident comments |
PATCH, DELETE | /comments/{commentId} | Update or delete an External API-authored comment |
GET | /download/comments/{commentId}/media/{mediaId}/urls | Generate Comment attachment download URLs |
Incident response
Incident endpoints return an IncidentResponse object directly or inside a paginated data array.
| Field | Type | Notes |
|---|---|---|
id | UUID | Incident identifier |
name | string | Short title |
description | string or null | Detailed report |
typeId | UUID | Incident Type |
categoryId | UUID | Category belonging to typeId |
stateId | UUID | Current workflow state |
priority | enum | MINOR, NORMAL, MAJOR, or CRITICAL |
locationId | UUID | Related Location |
pointId | UUID or null | Point belonging to the Location |
assigneeId | UUID or null | Assigned user |
occurredAt | date-time | When the Incident occurred |
mediaIds | UUID[] | Attached media; maximum 10 |
tags | string[] | Unique Incident tags |
clientRequestId | UUID | Immutable client idempotency key |
creationConfigVersion | integer or null | Creation configuration revision used to validate and normalize the Incident |
latitude | number or null | Range -90 to 90; supplied with longitude |
longitude | number or null | Range -180 to 180; supplied with latitude |
externalId | string or null | Identifier in an integrated system |
createdBy, lastModifiedBy | UUID | Audit user identifiers |
createdAt, lastModifiedAt | date-time | Audit 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"
}