Operations
On an HTTP route, path parameters replacesessionId, turnId, askId and subagentId. A GET takes the other fields as query parameters, other verbs as a JSON body. Unknown fields are refused with invalid_request.
Every write (a method with idempotencyKey) is HTTP only, with the key in the Idempotency-Key header. The WebSocket serves sessions.get, turns.get, asks.list, asks.get, subagents.list, subagents.get, events.list, terminals and ping. New events and deltas are pushed on Live, not here.
Creating a session is HTTP only:
POST /sessions with CreateSessionBody: id?, input?, title? (up to 200 characters), model?, effort?, speed?, mode?, metadata?.
Setting a session aside is HTTP only: PUT /sessions/{id}/aside with ref (1 to 255 characters), and DELETE /sessions/{id}/aside. Both return session. See Sessions.
Routes outside the schema
The relay (computer/src/wire/) serves these. The API routes for workspace files are /sessions/{id}/workspace/files, /file and /archive; opc push and opc pull call /archive. See Files.
WebSocket notifications
Server to client:
Client to server:
Events
Envelope:
A client must ignore event types it does not know (
Event.other: any other type, open data).
Deltas
Pushed only on a Livedeltas: stream; see Live. Each has type, sessionId, turnId and data.
Objects
Result is what opc -p --output-format json prints for a turn. No operation reads or writes Secret.
Errors
An error body iscode, message, and optionally status, retryable, requestId, field, reason and retryAfterMs. HTTP wraps it as {"error": {...}}; WebSocket sends it as the data of a JSON-RPC error.
forbidden carries a reason: missing_scope, read_only, owner_only, terminal_owner_only or aside_owner_only.