<- Back to Platphorm Sonify

Platphorm Sonify API

v1.0.0 - Robot event sonification

Endpoints

POST/api/events

Send 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/events

Retrieve 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/events

Clear all stored events.

Response

{ "success": true }
GET/api/health

Service health check. Returns status, version, uptime.

Response

{ "status": "healthy", "service": "ph3ar-radio", "version": "1.0.0" }
GET/api/docs

OpenAPI 3.1 specification as JSON.

GET/api/mcp/events

Proxy 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 TypeSoundMoodHealth
LOGINAscending coin cascade (7 notes)good+0.05
TASK_STARTBright coin drops (3 layers)good+0.03
TASK_END (success)Warm FM bellgood+0.02
LOGOUTDescending pitch dropbad-0.08
E_STOP / EMERGENCYDouble metallic hit + noise burstbad-0.15
TASK_CANCELLEDDetuned warning tonebad-0.06
goto_outcome: ABORTEDWarning tonebad-0.06
goto_outcome: INACTIVEWarning tonebad-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)

Discovery