POST - Create an Incident
Creates an Incident in the configured initial workflow state.
Request
- Method:
POST - Endpoint:
/incidents - Operation ID:
create-incident - Content-Type:
application/json
POST https://api.targpatrol.com/api/v1/incidents
x-api-key: {your_external_api_key}
Content-Type: application/json
{
"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",
"priority": "MAJOR",
"locationId": "20553a15-51df-4266-88c2-1067c2d1f0e8",
"pointId": null,
"assigneeId": "a60b0a09-344f-4232-80dc-9a039cdd5934",
"occurredAt": "2026-08-13T09:30:00.000Z",
"tags": ["safety", "broken-window"],
"clientRequestId": "91000000-0000-0000-0000-000000000001",
"configVersion": 7,
"latitude": 53.9023,
"longitude": 27.5619,
"externalId": "FACILITY-2041"
}
Request fields
The effective creation configuration determines which business fields are required, read-only, hidden, or defaulted.
| Field | Type | Rules |
|---|---|---|
clientRequestId | UUID | Always required. Generate once per logical creation and reuse it across retries |
configVersion | integer | Optional cached configuration revision for offline creation; omit for normal online creation |
name | string | Maximum 250 characters |
description | string | Optional unless the effective profile requires it |
typeId | UUID | Select an active Type from the effective configuration |
categoryId | UUID | Must belong to typeId |
priority | enum | MINOR, NORMAL, MAJOR, or CRITICAL |
locationId | UUID | Existing organization Location |
pointId | UUID | Optional Point belonging to locationId |
assigneeId | UUID | Optional organization user |
occurredAt | date-time | When the Incident occurred |
tags | string[] | Unique values, maximum 100 characters each; defaults to [] |
latitude, longitude | numbers | Optional coordinates; both must be present together |
externalId | string | Optional identifier in your system |
Do not include stateId or mediaIds. The server assigns the initial state. Attach files after the Incident exists through the Incident media endpoints.
When configVersion contains an older known revision, TARGPatrol validates the request against the
form, Type, and Category configuration active in that revision. The response records the revision
in creationConfigVersion.
Do not include createdBy. External API creation is attributed to the organization's External API
auditor.
Response
201 Created
Returns the complete IncidentResponse.
Other responses: 400 Bad Request, 401 Unauthorized, 404 Not Found, 500 Internal Server Error.