Arcova Docs

Developers

API Keys

Contract-backed public API reference for bearer-key authentication and currently supported endpoints.

Overview

Contract reference

Generated from the same OpenAPI document the application serves. Default environment is sandbox; switching to production requires an intentional opt-in.

FieldValue
Sourcegenerated-openapi-prefix-parity
Sandbox key prefixarcv_sandbox_
Production key prefixarcv_live_
Sandbox base URLhttps://arcova_ai.test/api/v1
Production base URLhttps://arcova_ai.test/api/v1

Only switch to production credentials after sandbox validation and response-shape verification pass.

Setup

Authentication headers

HeaderValueRequired
AuthorizationBearer arcv_sandbox_your_keyYes
Acceptapplication/jsonYes
X-Idempotency-Keysandbox-request-001No

Endpoint

List incidents

GET/api/v1/incidents

Success response

200 — Paginated set of `IncidentApiResource`

Fields: datalinksmeta

Sandbox curl

curl -X GET "https://arcova_ai.test/api/v1/incidents" \
  -H "Authorization: Bearer arcv_sandbox_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Production curl (intentional switch only)

Only switch to production credentials after sandbox validation and response-shape verification pass.

curl -X GET "https://arcova_ai.test/api/v1/incidents" \
  -H "Authorization: Bearer arcv_live_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Common failures

StatusReason
401Missing or invalid API key.
403API key scope does not allow this operation.

Endpoint

Create incident

POST/api/v1/incidents

Request parameters

NameTypeRequiredDescription
incident_typestringYesIncident classification code (e.g., `trespassing`, `medical_emergency`, `theft`). Determines workflow routing and required fields.
subjectstringYesShort incident title. Appears in lists and notification emails.
narrativestringYesDetailed description of the event including what happened, who was involved, and how the situation was resolved.
occurred_atstringYesISO-8601 timestamp of when the incident occurred. Cannot be in the future.
severitystringYesSeverity level. Determines escalation rules and notification urgency. One of `low`, `medium`, `high`, `critical`.
incident_categorystringNoBroad category for grouping incidents in reports (e.g., `security`, `safety`, `property`).
sourcestringNoHow the incident was reported. Defaults to `api` when submitted via this endpoint.
reporter_typestringNoWho filed the report. Defaults to `system` for API-created incidents.
site_idinteger|nullNoClient site where the incident occurred. Must belong to the API key's location.
location_descriptionstring|nullNoFree-text location description when `site_id` is not available (e.g., "parking lot B, near east entrance").
latitudenumber|nullNoGPS latitude of the incident location.
longitudenumber|nullNoGPS longitude of the incident location.
buildingstring|nullNoBuilding name or number.
floorstring|nullNoFloor or level within the building.
unit_numberstring|nullNoUnit or suite number.
common_areastring|nullNoCommon area name (e.g., "lobby", "pool deck", "loading dock").
actions_takenstring|nullNoDescription of actions taken by the officer or responding party at the scene.
dispositionstring|nullNoFinal disposition or outcome of the incident (e.g., "suspect detained", "false alarm").
law_enforcement_contactedboolean|nullNoWhether law enforcement was contacted about the incident.
law_enforcement_agencystring|nullNoName of the law enforcement agency contacted.
case_numberstring|nullNoPolice case or report number assigned by the responding agency.
officer_namestring|nullNoName of the responding law enforcement officer.
officer_badgestring|nullNoBadge number of the responding officer.
injuries_reportedboolean|nullNoWhether any injuries were reported as a result of the incident.
injury_detailsstring|nullNoDescription of injuries sustained, treatment provided, and transport details if applicable.
property_damageboolean|nullNoWhether property damage occurred during the incident.
damage_detailsstring|nullNoDescription of the damage including affected items and their condition.
damage_estimatenumber|nullNoEstimated cost of property damage in the location's currency.
weather_conditionsstring|nullNoWeather conditions at the time of the incident (e.g., "clear", "rain", "fog").
temperaturenumber|nullNoTemperature in Fahrenheit at the time of the incident.
occurred_timezonestring|nullNoIANA timezone of the occurrence (e.g., `America/New_York`). Used to display local time in reports.

Success response

201 — Successful response

Fields: messagedata

Sandbox curl

curl -X POST "https://arcova_ai.test/api/v1/incidents" \
  -H "Authorization: Bearer arcv_sandbox_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Production curl (intentional switch only)

Only switch to production credentials after sandbox validation and response-shape verification pass.

curl -X POST "https://arcova_ai.test/api/v1/incidents" \
  -H "Authorization: Bearer arcv_live_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Common failures

StatusReason
401Missing or invalid API key.
403API key scope does not allow this operation.

Endpoint

Get incident statistics

GET/api/v1/incidents/stats

Success response

200 — Successful response

Fields: data

Sandbox curl

curl -X GET "https://arcova_ai.test/api/v1/incidents/stats" \
  -H "Authorization: Bearer arcv_sandbox_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Production curl (intentional switch only)

Only switch to production credentials after sandbox validation and response-shape verification pass.

curl -X GET "https://arcova_ai.test/api/v1/incidents/stats" \
  -H "Authorization: Bearer arcv_live_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Common failures

StatusReason
401Missing or invalid API key.
403API key scope does not allow this operation.

Endpoint

Get incident

GET/api/v1/incidents/{uuid}

Request parameters

NameTypeRequiredDescription
uuidstringYes

Success response

200 — `IncidentApiResource`

Fields: data

Sandbox curl

curl -X GET "https://arcova_ai.test/api/v1/incidents/{uuid}" \
  -H "Authorization: Bearer arcv_sandbox_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Production curl (intentional switch only)

Only switch to production credentials after sandbox validation and response-shape verification pass.

curl -X GET "https://arcova_ai.test/api/v1/incidents/{uuid}" \
  -H "Authorization: Bearer arcv_live_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Common failures

StatusReason
401Missing or invalid API key.
403API key scope does not allow this operation.

Endpoint

Update incident

PATCH/api/v1/incidents/{uuid}

Request parameters

NameTypeRequiredDescription
uuidstringYes
incident_typestringNoIncident classification code (e.g., `trespassing`, `medical_emergency`, `theft`).
subjectstringNoShort incident title.
narrativestringNoDetailed description of the event.
occurred_atstringNoISO-8601 timestamp of when the incident occurred. Cannot be in the future.
severitystringNoSeverity level (`low`, `medium`, `high`, `critical`).
incident_categorystringNoBroad category for grouping incidents in reports.
site_idinteger|nullNoClient site where the incident occurred. Must belong to the API key's location.
location_descriptionstring|nullNoFree-text location description.
latitudenumber|nullNoGPS latitude.
longitudenumber|nullNoGPS longitude.
buildingstring|nullNoBuilding name or number.
floorstring|nullNoFloor or level within the building.
unit_numberstring|nullNoUnit or suite number.
common_areastring|nullNoCommon area name (e.g., "lobby", "pool deck").
actions_takenstring|nullNoDescription of actions taken by the officer or responding party.
dispositionstring|nullNoFinal disposition or outcome of the incident.
law_enforcement_contactedbooleanNoWhether law enforcement was contacted.
law_enforcement_agencystring|nullNoName of the law enforcement agency contacted.
case_numberstring|nullNoPolice case or report number.
officer_namestring|nullNoName of the responding officer.
officer_badgestring|nullNoBadge number of the responding officer.
injuries_reportedbooleanNoWhether any injuries were reported.
injury_detailsstring|nullNoDescription of injuries sustained and treatment provided.
property_damagebooleanNoWhether property damage occurred.
damage_detailsstring|nullNoDescription of the damage.
damage_estimatenumber|nullNoEstimated cost of property damage.
weather_conditionsstring|nullNoWeather conditions at the time (e.g., "clear", "rain", "fog").
temperaturenumber|nullNoTemperature in Fahrenheit at the time of the incident.
occurred_timezonestring|nullNoIANA timezone of the occurrence (e.g., `America/New_York`).
resolution_notesstring|nullNoNotes explaining how the incident was resolved. Used when closing an incident.

Success response

200 — `IncidentApiResource`

Fields: data

Sandbox curl

curl -X PATCH "https://arcova_ai.test/api/v1/incidents/{uuid}" \
  -H "Authorization: Bearer arcv_sandbox_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Production curl (intentional switch only)

Only switch to production credentials after sandbox validation and response-shape verification pass.

curl -X PATCH "https://arcova_ai.test/api/v1/incidents/{uuid}" \
  -H "Authorization: Bearer arcv_live_your_key" \
  -H "Accept: application/json" \
  -H "X-Idempotency-Key: sandbox-request-001"

Common failures

StatusReason
401Missing or invalid API key.
403API key scope does not allow this operation.

Reference

Shared failure patterns

StatusReason
401Missing or invalid API key.
403API key scope does not allow this operation.

Reference

Error response format

All error responses follow a consistent shape with an error code, message, and optional detail.

{
  "error": {
    "code": "invalid_api_key",
    "message": "The provided API key is invalid or has been revoked.",
    "detail": "Key arcv_sbx_abc123 was revoked at 2024-01-15T10:30:00Z"
  }
}

Status codes

StatusCodeMeaningAction
401invalid_api_keyKey revoked or malformedRegenerate key
403insufficient_scopeMissing permissionAdd scope to key
404not_foundResource does not existCheck resource ID
422validation_errorRequest body invalidCheck error.detail
429rate_limitedToo many requestsImplement backoff
500internal_errorServer errorRetry with backoff

Reference

Pagination

List endpoints return paginated results with page-based navigation.

GET /api/v1/incidents?page=1&per_page=15

Response:
{
  "data": [...],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100,
    "last_page": 7
  },
  "links": {
    "first": "/api/v1/incidents?page=1",
    "last":  "/api/v1/incidents?page=7",
    "next":  "/api/v1/incidents?page=2",
    "prev":  null
  }
}
  • page (query) — Page number, default 1.
  • per_page (query) — Items per page, default 15, max 100.

Reference

Rate limiting

All endpoints are rate limited per API key. The default limit is 60 requests per minute and may vary by endpoint.

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1700000060

When rate limited, the API returns HTTP 429 with a retry_after value in seconds.