Skip to content
Documentation menu
docs / api / post-v1-incidents-along
routing

POST/v1/incidents/along

API key required, sent as Authorization: Bearer snk_… or ?api_key=snk_….

Call it

bash
curl -fsS -X POST "https://api.mapmap.ai/v1/incidents/along" \
  -H "Authorization: Bearer $MAPMAP_KEY" \
  -H "Content-Type: application/json" \
  -d @request.json

Request body

application/json · IncidentsAlongRequest

Route shape as polyline6 plus an optional corridor buffer (buffer_m, default 60 m, max 500 m)

FieldTypeRequiredDescription
buffer_mnumbernoCorridor half-width in metres; default 60, clamped to at most 500.
shapestringyesThe route shape as a polyline6 string.

Responses

200Incidents along the route (arc-ordered) and every configured source's coverage metadata. Rows from drivers' traffic reports (source_kind: "driver", source: "mapmap-drivers") appear only once two distinct drivers report the same thing nearby in the same direction, only for a route travelling that direction, always with severity: "other" and never with a delay; they add driver_kind, reports, reported_at and expires_at
FieldTypeRequiredDescription
attributionstring[]noAttribution notices for the sources actually configured, to display verbatim.
incidentsIncidentAlong[]yesIncidents within the corridor, arc_m ascending.
sourcesIncidentSourceMetaOut[]yesEvery configured source's coverage metadata, present even when incidents is empty.
400Invalid request
401Missing or invalid API key
429Quota or rate limit exceeded
501Incident data is not enabled (SN_INCIDENTS_DIR unset)

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-01 · operationId post_incidents_along