{"service":"m2a-api","description":"Device REST API (decision/impression/heartbeat) + admin→device WS command relay","endpoints":{"GET /health":"Liveness probe","GET /v1/decision":"Preview the ad a device would be served (no impression unless record=true)","POST /v1/decision":"Select the ad for a device and record the impression (record=false to skip)","POST /v1/impressions":"Confirm a creative played (deviceId, campaignMediaId)","POST /v1/heartbeat":"Report device telemetry/location (state history source)","GET /v1/buffer-ads":"All currently servable creatives for offline pre-cache","GET /v1/devices/check":"Resolve/validate a device reference","WS /relay":"admin→device command relay (admin: ?role=admin&token=<supabase jwt>; device: ?deviceId=&channel=agent|kiosk|adloader)"}}