List notifications across the organization's spaces

The current recipient's notifications in every space of the organization where they hold a role, in one keyset-paginated page, newest first. The rule of GET /api/notifications holds in each space: the caller's own notifications, no role grant asked. Each item carries its spaceId: read one with GET /api/notifications/{id} and mark it read with PUT /api/notifications/{id}/read, both in that space; PUT /api/notifications/read-all reads one space's feed. Takes the query of GET /api/notifications. A space the caller holds no role in (a closed space not joined, a private space they are not a member of) contributes nothing, and a credential pinned to a space (a space API key, a space-bound MCP token) reaches that space only. No X-Space-Id: the organization is the path's. An end-user is refused with 403.

GET/api/orgs/{orgId}/notifications

Authorization

better-auth.session_token<token>

Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.

In: cookie

Path Parameters

orgId*string

Organization ID.

Query Parameters

unread?boolean

When true, only unread notifications are returned. A value that is neither true nor false is rejected with 400, as is any parameter this list does not name.

limit?integer
Default20
Range1 <= value <= 100
startingAfter?string

Keyset cursor — return notifications after this id (newest-first order). Supplied by the Link: rel="next" header.

Formatuuid
curl -X GET "https://your-instance/api/orgs/string/notifications"
{
  "object": "list",
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "spaceId": "spc_8f14e45fceea167a5a36dedd4bea2543",
      "type": "agent_message",
      "runId": "run_8f14e45fceea167a5a36dedd4bea2543",
      "payload": {
        "packageId": "@acme/email-sorter",
        "agent_name": "Email sorter",
        "title": "Inbox sorted",
        "message": "42 messages filed."
      },
      "read_at": null,
      "createdAt": "2026-01-15T10:31:12Z"
    }
  ],
  "hasMore": false
}

{
  "type": "https://docs.appstrate.dev/errors/validation-failed",
  "title": "Validation Failed",
  "status": 400,
  "detail": "name: Invalid input: expected string, received undefined (+2 more)",
  "code": "validation_failed",
  "request_id": "req_abc123",
  "errors": [
    {
      "field": "name",
      "code": "required",
      "message": "Invalid input: expected string, received undefined"
    },
    {
      "field": "email",
      "code": "invalid_format",
      "message": "Invalid email address"
    },
    {
      "field": "age",
      "code": "invalid_type",
      "message": "Invalid input: expected number, received string"
    }
  ]
}

{
  "type": "https://docs.appstrate.dev/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid or missing session",
  "code": "unauthorized",
  "request_id": "req_abc123"
}
{
  "type": "https://docs.appstrate.dev/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "Insufficient permissions",
  "code": "forbidden",
  "request_id": "req_abc123"
}