zone.stratos.sync.subscribeRecords

Subscribe to stratos events. When 'did' is provided, subscribes to record updates for that account. When omitted, subscribes to service-level events (enrollments). Callers must authenticate with a signed service JWT via the Authorization: Bearer header.

Details · subscription
Kindsubscription
Authoritysync.stratos.zone
Indexed

Subscription

subscription · WebSocket

Parameters

query string

cursor

integer

The last known event sequence number to resume from.

did

string · did

The DID of the account to subscribe to. If omitted, subscribes to service-level enrollment events.

domain

string

Optional domain filter. Only events for records with this domain in their boundary will be emitted.

  • maxLength: 253

Messages

DAG-CBOR frames

#commit

object

A commit event containing record operations.

An enrollment event indicating a user has enrolled or unenrolled from the service.

#info

object

An informational message about the subscription state.

Errors

FutureCursor

Cursor is in the future.

AuthRequired

Authentication is required.

#commit

object

A commit event containing record operations.

Properties

did

requiredstring · did

The DID of the account.

ops

requiredarray

List of record operations in this commit.

itemsref
Reference

rev

requiredstring · tid

The repo revision.

seq

requiredinteger

The sequence number of this event.

time

requiredstring · datetime

Timestamp of when the event was sequenced.

#enrollment

object

An enrollment event indicating a user has enrolled or unenrolled from the service.

Properties

action

requiredstring

The enrollment action.

  • maxLength: 32
  • knownValues: enroll | unenroll

The boundaries assigned to the user.

itemsstring

did

requiredstring · did

The DID of the user.

service

string · uri

The Stratos service endpoint URL.

time

requiredstring · datetime

Timestamp of the enrollment event.

#info

object

An informational message about the subscription state.

Properties

message

string

Additional details about the info message.

  • maxLength: 1024

name

requiredstring

The type of info message.

  • maxLength: 128
  • knownValues: OutdatedCursor

#recordOp

object

A single record operation within a commit.

Properties

action

requiredstring

The type of operation.

  • maxLength: 32
  • knownValues: create | update | delete

cid

cid-link

The CID of the record. Present for create and update operations.

path

requiredstring

The record path (collection/rkey).

  • maxLength: 512

record

unknown

The record content. Present for create and update operations.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Stream every archived and live Jetstream event in seq order, framed per the xrpc.v1.json subprotocol. The kinds, dids, and collections filters are independent predicates ANDed together; each is match-all when omitted. See the parameter and error descriptions for cursor, filtering, and compression semantics.