Reference

API and WebSocket

REST: /api. WebSocket: /ws. /api/health stays public even with token authentication. The server checks Origin on WebSocket connections and state-changing requests that include that header.

curl http://127.0.0.1:4000/api/health
curl -H "Authorization: Bearer $COCKPIT_TOKEN" http://127.0.0.1:4000/api/missions
curl -H "Authorization: Bearer $COCKPIT_TOKEN" http://127.0.0.1:4000/api/agents

Methods, paths, and schemas are defined in:

AreaImplementation
Missions and topologysrc/server/routes/mission-routes.ts
Projects and clonessrc/server/routes/project-routes.ts
Files, Git, memory, and skillssrc/server/routes/workspace-routes.ts
Agent discoverysrc/server/routes/agent-routes.ts
Panels and teamsrc/server/routes/pane-routes.ts, src/server/routes/team-routes.ts
Tasks, dispatch, and waitssrc/server/routes/task-routes.ts
Runs, evidence, and resultssrc/server/routes/execution-routes.ts
Reviewsrc/server/routes/review-routes.ts
Racesrc/server/routes/race-routes.ts
Marketplacesrc/server/routes/marketplace-routes.ts
Compliancesrc/server/routes/compliance-routes.ts
Voice and mediasrc/server/routes/voice-routes.ts, src/server/routes/media-routes.ts
Remote access and Companionsrc/server/routes/remote-routes.ts, src/server/routes/companion-routes.ts

The WS multiplexer distributes terminal, orchestration, and review messages. See web/src/services/ws-client.ts for the interface protocol.