Skip to content

HTTP API

The local API is version 1, defined in api/openapi.yaml with JSON Schemas in api/schemas/. The protocol version does not assert a stable product release.

Server Authentication
Unix socket, default ~/.majlis/majlis.sock X-Majlis-Binding client token
Loopback TCP (majlis daemon --listen 127.0.0.1:0) Client binding token
Dashboard bridge (majlis ui) Single-use launch token exchanged for an HttpOnly session cookie plus CSRF token

Authenticated caller authority is always derived by the server. Mutations need stable idempotency keys and, for existing state, expected revisions.

All paths are under /v1.

Area Paths
Snapshot and events /workspaces/{ws}/snapshot, /workspaces/{ws}/events, /workspaces/{ws}/wait
Sessions and hooks /workspaces/{ws}/sessions/register, /workspaces/{ws}/hooks/{event}
Admission /workspaces/{ws}/admissions, /workspaces/{ws}/admissions/start
Tasks /workspaces/{ws}/tasks, /tasks/{id}, and begin, submit, accept, request-changes, cancel, orphan, recover, recover/preview
Recovery /workspaces/{ws}/recoveries/{recovery_id}, /workspaces/{ws}/incarnations/{id}/reconcile
Leases /workspaces/{ws}/leases/acquire, renew, release
Messages and obligations /workspaces/{ws}/messages, /messages/{id}, /inbox, /obligations/{id}, /obligations/{id}/resolve
Decisions /workspaces/{ws}/decisions, /decisions/{id}/accept, contest, supersede
Policy /workspaces/{ws}/policy, /workspaces/{ws}/policy/accept
Checkpoints /workspaces/{ws}/checkpoint-evictions/{id}, /checkpoint-evictions/{id}/retry
Operator and dashboard /workspaces/{ws}/operator/claim, /operator/session, /ui/exchange, /ui/session, /ui/claim
Diagnostics /doctor

See Errors, Idempotency and Event stream for the cross-cutting contracts.