SynapDocs
Hub REST API

Events

The Events operations of the Hub REST API (2 operations).

For BuildersOpen-source podSynap Cloud

Generated from Synap-core/backend main at 24fabe7, which can be newer than the stable release self-hosters install.

GET
/events

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Query Parameters

userId*string
type?string
subjectType?string
subjectId?string
sessionId?string

A focus session id: only the events that session produced.

fromDate?string

ISO timestamp. Defaults to 7 days ago.

toDate?string

ISO timestamp, inclusive upper bound.

limit?string

Default 50, hard-capped at 200.

offset?string

Non-negative integer, default 0. Order is timestamp DESC, id DESC; a full page carries nextOffset.

ungoverned?string

When 'true', return only 'ungoverned AI writes' — agent writes that EXECUTED with no proposal behind them (is_agent = true AND proposal_id IS NULL, on the .completed event). Governed (auto-approved or approved) agent writes carry a proposal id and are excluded.

Value in"true""false"

Response Body

Events array (newest first)

application/json
  1. response
events*array<>
nextOffset?integer
Example Request
curl -X GET 'https://pod.example.com/api/hub/events?userId=string'
Example Response
{  "events": [    {      "id": "string",      "type": "string",      "subjectType": "string",      "subjectId": "string",      "userId": "string",      "workspaceId": "string",      "data": {        "property1": null,        "property2": null      },      "timestamp": "string",      "property1": null,      "property2": null    }  ],  "nextOffset": 0}

SSE stream of new events

GET
/events/stream

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Response Body

Success

Example Request
curl -X GET 'https://pod.example.com/api/hub/events/stream'
Example Response
Empty

On this page