Endpoints
POST
/api/eventsSend robot events (single or array). Each event triggers a unique sound based on event_type and goto_outcome.
Request Body
[
{
"robot_id": "xap035",
"event_type": "TASK_START",
"time": "2026-01-19 18:48:30",
"task_id": "b98843f3-3629-4f1a-a52e-fec620fb45fe",
"destination": "Charge 7",
"badge_code": "Charge 7",
"duration_sec": 0,
"goto_outcome": ""
}
]Response
{ "success": true, "count": 1, "total": 15, "latestSeq": 42 }GET
/api/eventsRetrieve events. Use ?after_seq=N for cursor-based polling (new events only), ?all=1 for full feed, ?limit=N for max results.
Response
{ "events": [...], "latestSeq": 42, "total": 15 }DELETE
/api/eventsClear all stored events.
Response
{ "success": true }GET
/api/healthService health check. Returns status, version, uptime.
Response
{ "status": "healthy", "service": "ph3ar-radio", "version": "1.0.0" }GET
/api/docsOpenAPI 3.1 specification as JSON.
GET
/api/mcp/eventsProxy for MCP events from mcp.platphormnews.com, normalized to RobotEvent format.
Response
{ "events": [...], "source": "https://mcp.platphormnews.com", "count": 5 }Sound Mapping
Each event type maps to a distinct sound. The system maintains a global health score (0-1) that affects all 6 sound modules.
| Event Type | Sound | Mood | Health |
|---|---|---|---|
| LOGIN | Ascending coin cascade (7 notes) | good | +0.05 |
| TASK_START | Bright coin drops (3 layers) | good | +0.03 |
| TASK_END (success) | Warm FM bell | good | +0.02 |
| LOGOUT | Descending pitch drop | bad | -0.08 |
| E_STOP / EMERGENCY | Double metallic hit + noise burst | bad | -0.15 |
| TASK_CANCELLED | Detuned warning tone | bad | -0.06 |
| goto_outcome: ABORTED | Warning tone | bad | -0.06 |
| goto_outcome: INACTIVE | Warning tone | bad | -0.06 |
Quick Start
cURL
curl -X POST https://radio.ph3ar.com/api/events \
-H "Content-Type: application/json" \
-d '[{"robot_id":"xap035","event_type":"LOGIN"},{"robot_id":"xap043","event_type":"TASK_START","destination":"Charge 7"},{"robot_id":"xap012","event_type":"E_STOP"}]'Python
import requests
events = [
{"robot_id": "xap035", "event_type": "LOGIN"},
{"robot_id": "xap043", "event_type": "TASK_START", "destination": "Parcel Load Queue"},
{"robot_id": "xap012", "event_type": "LOGOUT"},
]
requests.post("https://radio.ph3ar.com/api/events", json=events)