Skip to main content

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.

FieldTypeRules
clientRequestIdUUIDAlways required. Generate once per logical creation and reuse it across retries
configVersionintegerOptional cached configuration revision for offline creation; omit for normal online creation
namestringMaximum 250 characters
descriptionstringOptional unless the effective profile requires it
typeIdUUIDSelect an active Type from the effective configuration
categoryIdUUIDMust belong to typeId
priorityenumMINOR, NORMAL, MAJOR, or CRITICAL
locationIdUUIDExisting organization Location
pointIdUUIDOptional Point belonging to locationId
assigneeIdUUIDOptional organization user
occurredAtdate-timeWhen the Incident occurred
tagsstring[]Unique values, maximum 100 characters each; defaults to []
latitude, longitudenumbersOptional coordinates; both must be present together
externalIdstringOptional 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.