SynapSynapDocs
Hub REST API

Events

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

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)
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
fromDate?string

ISO timestamp. Defaults to 7 days ago.

limit?string

Default 50, hard-capped at 200.

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<>
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    }  ]}

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