Skip to content
Documentation menu
docs / api / post-v1-camera-incidents
Routing

POST/v1/camera-incidents

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Needs a full key; a browser (maps) key is refused.
Price1 call per request. Class: standard, or premium for truck and ADR work. Published as unit_rules.default in /pricing.json.
PremiumWhen the body asks for truck routing: "costing": "truck", a top-level adr object or "hazmat": true

What it does

Answers from the camera-incidents artefact (a traffic camera saw it and a vision model confirmed it), each record with its evidence clip, confidence, verifier and expiry. The same answer the MCP tool camera_incidents gives. An empty incidents list means no camera-verified incident, never a clear road: show coverage_note.

Call it

bash
curl -fsS -X POST "https://api.mapmap.ai/v1/camera-incidents" \
  -H "Authorization: Bearer $MAPMAP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"near":[51.5007,-0.1246],"radius_m":1000}'

Request body

application/json · CameraIncidentsRequest

FieldTypeRequiredDescription
bboxnumber[]no[min_lon, min_lat, max_lon, max_lat].
buffer_mnumbernoCorridor half-width for shape, metres: above 0 and at most 500. Default 60.
include_recently_expiredbooleannoAlso return records that expired in the last hour. Default false.
min_confidencenumbernoDrop records below this verifier confidence, 0..=1. Default 0.
nearnumber[]no[lat, lon] of the point to search around (note the order: this body follows the MCP tool, which takes latitude first).
radius_mnumbernoRadius for near, metres: above 0 and at most 10,000. Default 1,000.
shapestringnoA route shape as an encoded polyline (precision 6); the corridor rule of POST /v1/incidents/along applies.

Example: A request assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "near": [
    51.5007,
    -0.1246
  ],
  "radius_m": 1000
}

Responses

200The camera-verified incidents in force for the query, with the coverage note and attribution
FieldTypeRequiredDescription
attributionstring[]yesAttribution lines required by the camera providers, verbatim.
coverage_notestringyesWhich cameras the feed covers, and that an empty list means "no camera-verified incident", never a clear road. Show it.
incidentsCameraIncident[]yesRecords in force (and recently expired, if asked).

Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "attribution": [
    "string"
  ],
  "coverage_note": "string",
  "incidents": [
    {
      "camera_name": "string",
      "camera_position": [
        0
      ],
      "confidence": 0,
      "end": "string",
      "id": "string",
      "incident_kind": {},
      "kind": "closed",
      "source": "string",
      "start": "string",
      "verifier": "string",
      "ways": []
    }
  ]
}
400Not exactly one of near, bbox or shape; a value out of range; or a body that does not parse (bad-request)

application/problem+json · Problem

401No key, or a missing, malformed, unknown, revoked or expired one (unauthorized); the body carries signup, docs and a one-call hint for a free key

application/problem+json · Problem

402Beyond the included volume with no way to pay this call: an x402 body naming how to pay (provisional key past its allowance, prepaid balance below the price, or a rejected X-PAYMENT). Not problem+json

application/json · X402PaymentRequired

403The key may not call this: a browser key outside its scope (scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)

application/problem+json · Problem

413The request declares a body larger than 1048576 bytes (plain text, not problem+json)

text/plain

429Per-key rate limit (rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)

application/problem+json · Problem

500The incidents artefact exists but could not be read (internal)

application/problem+json · Problem

501Camera-verified incidents are not enabled on this deployment (camera-incidents-not-enabled)

application/problem+json · Problem

504The request did not finish within the gateway's request deadline (request-timeout)

application/problem+json · Problem

Error bodies follow the shared problem model documented on API conventions.

Also under Routing

Generated from https://api.mapmap.ai/openapi.json on 2026-11-06 · operationId post_camera_incidents