HTTP APIAPI
Close a session
Permanently closes a session and stops any active or queued work. Requires a management token. Event history remains readable.
POST
/sessions/{id}/closeAuthorization
bearer AuthorizationBearer <token>
In: header
Path Parameters
id*string
Opaque session ID.
Match
^[a-fA-F0-9]{32}$Response Body
application/json
application/json
curl -X POST "https://example.com/sessions/string/close" \ -H "Authorization: Bearer YOUR_TOKEN"{ "status": "string"}Get a session GET
Returns metadata and current status for a session. If the session is not on local disk and external storage is configured, Brain loads the latest published checkpoint.
Read or stream events GET
Returns a page of retained events as JSON, or streams history and live updates when called with Accept: text/event-stream. Pass after (or Last-Event-ID) with the last retained event's cursor to resume from a known position. Returns 409 cursor_unavailable if the cursor points to an unsynced tail lost during restore.