network.bsky.jetstream.subscribeEvents

bsky-lexicons.bsky.social

{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "account": {
      "description": "An account status change (active/deactivated/deleted/...), wrapping the upstream firehose event verbatim.",
      "properties": {
        "account": {
          "description": "The upstream event; its seq and time are the upstream relay's, not Jetstream's.",
          "ref": "com.atproto.sync.subscribeRepos#account",
          "type": "ref"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "time": {
          "description": "The time Jetstream witnessed this event, microsecond precision. Timestamp imports apply only to record (commit) events, so this is always the witnessed time.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "seq",
        "did",
        "time",
        "account"
      ],
      "type": "object"
    },
    "commit": {
      "description": "A single record mutation (create, update, or delete).",
      "properties": {
        "cid": {
          "description": "CID of the record. Absent for deletes.",
          "format": "cid",
          "type": "string"
        },
        "collection": {
          "description": "Collection NSID of the record.",
          "format": "nsid",
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "operation": {
          "knownValues": [
            "create",
            "update",
            "delete"
          ],
          "type": "string"
        },
        "record": {
          "description": "The record decoded to JSON. Absent for deletes.",
          "type": "unknown"
        },
        "rev": {
          "description": "The repo rev of the commit that produced this op.",
          "format": "tid",
          "type": "string"
        },
        "rkey": {
          "description": "Record key.",
          "format": "record-key",
          "type": "string"
        },
        "seq": {
          "description": "Jetstream's monotonic per-event sequence number; the stream cursor.",
          "type": "integer"
        },
        "time": {
          "description": "The event's display timestamp, microsecond precision: when Jetstream witnessed the event, unless an operator timestamp import overrode it. Timestamp cursors translate against the witnessed time, so after an import this value may not be a faithful resume position.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "seq",
        "did",
        "time",
        "rev",
        "operation",
        "collection",
        "rkey"
      ],
      "type": "object"
    },
    "identity": {
      "description": "An identity change (handle or DID document update), wrapping the upstream firehose event verbatim.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "identity": {
          "description": "The upstream event; its seq and time are the upstream relay's, not Jetstream's.",
          "ref": "com.atproto.sync.subscribeRepos#identity",
          "type": "ref"
        },
        "seq": {
          "type": "integer"
        },
        "time": {
          "description": "The time Jetstream witnessed this event, microsecond precision. Timestamp imports apply only to record (commit) events, so this is always the witnessed time.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "seq",
        "did",
        "time",
        "identity"
      ],
      "type": "object"
    },
    "info": {
      "description": "An advisory, non-fatal notice about the stream (mirrors com.atproto.sync.subscribeRepos#info). Carries no seq and does not advance the cursor. OutdatedCursor is sent as the first frame when a unix-microseconds timestamp cursor below the retention floor was clamped up to the floor; the message names the seq actually resumed from.",
      "properties": {
        "message": {
          "type": "string"
        },
        "name": {
          "knownValues": [
            "OutdatedCursor"
          ],
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "main": {
      "description": "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.",
      "errors": [
        {
          "description": "The client is far behind the live tip AND reading below the server's floor rate for a sustained window; the server drops adversarially-slow readers. A merely-slow-but-progressing reader is never dropped.",
          "name": "ConsumerTooSlow"
        },
        {
          "description": "Rejected pre-upgrade with HTTP 400, never as a stream error frame: the requested seq cursor is below the server's retention floor. The message carries the floor seq; archive-backfilling clients re-enter backfill from their last durable seq.",
          "name": "CursorTooOld"
        },
        {
          "description": "Rejected pre-upgrade with HTTP 400, never as a stream error frame: the zstdDictionary ID is unknown or retired. The message carries the current dictionary ID; re-fetch via network.bsky.jetstream.getZstdDictionary.",
          "name": "UnknownZstdDictionary"
        }
      ],
      "message": {
        "schema": {
          "refs": [
            "#commit",
            "#identity",
            "#account",
            "#sync",
            "#info"
          ],
          "type": "union"
        }
      },
      "parameters": {
        "properties": {
          "collections": {
            "description": "Collection NSIDs or '<prefix>.*' patterns; constrains which commit events are delivered. Non-commit kinds are unaffected — combine with kinds=commit for a commits-only collection stream. Rejected pre-upgrade with HTTP 400 (InvalidRequest) when kinds is set and excludes commit, since the filter could never apply. Omitted or empty: all collections.",
            "items": {
              "type": "string"
            },
            "maxLength": 100,
            "type": "array"
          },
          "cursor": {
            "description": "Resume position, inclusive: the server replays events with seq >= cursor and the client dedups the overlap. Values >= 1e15 are interpreted as a unix-microseconds timestamp instead of a seq and translated to the first seq witnessed at or after that instant; a timestamp below the retention floor clamps up to the floor and an #info OutdatedCursor frame is sent. Omitted: start at the live tip.",
            "type": "integer"
          },
          "dids": {
            "description": "Repo DIDs to receive events for; applies to every event kind. Omitted or empty: all repos.",
            "items": {
              "format": "did",
              "type": "string"
            },
            "maxLength": 10000,
            "type": "array"
          },
          "kinds": {
            "description": "Event kinds to receive; values are the message $type fragment names. Omitted or empty: all kinds. A value outside the enum is rejected pre-upgrade with HTTP 400 (InvalidRequest) rather than silently never matching.",
            "items": {
              "enum": [
                "commit",
                "identity",
                "account",
                "sync"
              ],
              "type": "string"
            },
            "maxLength": 4,
            "type": "array"
          },
          "maxMessageSizeBytes": {
            "default": 0,
            "description": "Skip events whose uncompressed frame (envelope included) exceeds this many bytes. 0 (default) means no limit.",
            "maximum": 4294967295,
            "minimum": 0,
            "type": "integer"
          },
          "zstdDictionary": {
            "description": "Jetstream extension: opt into dict-zstd frame compression with the given zstd dictionary ID (obtained via network.bsky.jetstream.getZstdDictionary). Frames then arrive as binary websocket messages, each one zstd frame whose decompressed bytes are exactly the xrpc.v1.json text frame. An unknown or retired ID is rejected pre-upgrade with HTTP 400 carrying the current ID.",
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "params"
      },
      "subprotocol": "xrpc.v1.json",
      "type": "subscription"
    },
    "sync": {
      "description": "An archived #sync event (broken commit chain; consumers should resync the repo), wrapping the upstream firehose event verbatim. Never emitted on the legacy v1 /subscribe wire.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "sync": {
          "description": "The upstream event; its seq and time are the upstream relay's, not Jetstream's.",
          "ref": "com.atproto.sync.subscribeRepos#sync",
          "type": "ref"
        },
        "time": {
          "description": "The time Jetstream witnessed this event, microsecond precision. Timestamp imports apply only to record (commit) events, so this is always the witnessed time.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "seq",
        "did",
        "time",
        "sync"
      ],
      "type": "object"
    }
  },
  "id": "network.bsky.jetstream.subscribeEvents",
  "lexicon": 1
}

Validate Record

Validate a record against network.bsky.jetstream.subscribeEvents

Validation Options
Automatically resolve and include external schemas for full validation
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:4v4y5r3lwsbtmsxhile2ljac
CID
bafyreiblz3imqzdlvhuqc7s2iso7qwdcowbnis6ku2euw7vrgi37373nge
Indexed At
2026-08-15 18:45 UTC
AT-URI
at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/network.bsky.jetstream.subscribeEvents

Referenced Schemas (3)

Similar Lexicons

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

  • Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream seque…

  • 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…

Lexicon Garden

@