Subscription ID (esub_...).
Request body.
Optionalconsumer_id?: stringConsumer identity between 1 and 128 bytes, recorded on the lease for attribution.
Optionalmax_events?: numberOpts into batch mode: leases up to this many lease-available deliveries (between 1 and 20) in sequence order, skipping leased entries instead of blocking on the head. Omit to keep strict head-of-line semantics.
Optionalrequest_id?: stringIdempotency key between 1 and 128 bytes. Use a value unique per claim attempt (e.g. a UUID) — the key is scoped to the subscription, so a reused value takes over whatever leases it last stamped. Retrying a claim with the same request_id while its leases are unexpired returns the same deliveries (regardless of max_events) with fresh receipt handles and refreshed leases.
Optionalvisibility_timeout_seconds?: numberLease duration override between 15 and 3600 seconds.
Optionalwait_seconds?: numberLong-poll bound between 0 and 20 seconds. When the queue is empty, the request waits up to this long for a delivery before returning an empty data array. 0 (or omitting) returns immediately.
Successful response
Create a domain-event subscription Creates a durable subscription that receives exportable domain events matching its exact event names. Matching events fan out into a per-subscription queue bounded by max_pending_events and retention_seconds; consume with claim and acknowledge.
Request body.
Exact event names to receive.
Optionalfilter?: Record<string, unknown>Optional match over subject_key, actor_key, and allowlisted dims. Only valid when every event name is a custom (script-emitted) event type. Missing filter matches all events.
Optionalmax_pending_events?: numberQueue cap. Defaults to 100; maximum 1000.
Customer-defined subscription name.
Optionalprevious_filter?: Record<string, unknown>Expected legacy filter for atomic watch-key adoption.
Optionalprevious_filters?: Record<string, unknown>[]Additional exact historical filters accepted for atomic watch-key adoption.
Optionalprevious_watch_key?: stringOptionally adopt an existing key in the exact same owner and residence when the destination is absent and its filter exactly matches previous_filter, one of previous_filters, or filter. Preserves queue identity and deliveries; mismatches reject the request without changing either queue.
Optionalretention_seconds?: numberDelivery retention in seconds. Defaults to 86400 (24 hours); between 7200 and 2592000. Applies to future deliveries only.
Optionalstatus?: "active" | "paused"Initial status. Defaults to active.
Optionalttl_seconds?: numberOptional subscription lifetime in seconds, between 1 and 604800. Recreating a watch key resets its expiry; omission makes it permanent.
Optionalvisibility_timeout_seconds?: numberDefault claim lease in seconds. Defaults to 300.
Optionalwatch_key?: stringOptional durable identity within the caller owner and residence. Repeated creates replace routes and filter on that queue; omission creates a new queue regardless of name.
The new volatile subscription.
Delete a domain-event subscription Deletes the subscription and every delivery still in its queue.
Subscription ID (esub_...).
No content
Discard pending subscription deliveries Removes lease-available pending deliveries, preserves active leases, and records the gap.
Subscription ID (esub_...).
An object containing discarded, the number of removed deliveries.
Get a domain-event subscription Returns one subscription and its current queue counters.
Subscription ID (esub_...).
Successful response
Peek at the head of a subscription queue Returns the oldest unacknowledged delivery without reserving it. This diagnostic read cannot be used as a safe substitute for claim.
Subscription ID (esub_...).
Successful response
List domain-event subscriptions Lists the subscriptions visible to the caller, with current queue counters.
Optionalparams: { page?: number; perPage?: number }Query parameters.
Optionalpage?: numberPage number, starting at 1.
OptionalperPage?: numberSubscriptions per page, from 1 through 100.
Subscriptions visible to this caller.
Read a subscription queue Returns a non-reserving, oldest-first view of unacknowledged deliveries, including the queue's loss indicators (queue_epoch, dropped_events_total, dropped_through_position). Committed deliveries are visible immediately. Exclusive sequence cursors navigate the currently visible queue; they are not durable consumption checkpoints. A lower-sequence delivery that commits after a cursor advances can be omitted from subsequent pages while remaining visible in a fresh listing. Use claim and acknowledge for reliable consumption.
Subscription ID (esub_...).
Optionalparams: { afterCursor?: string; beforeCursor?: string; limit?: number }Query parameters.
OptionalafterCursor?: stringOpaque exclusive sequence cursor for the following page; mutually exclusive with before_cursor. Navigation only: late commits below this position can be missed. Use claim and acknowledge for reliable consumption.
OptionalbeforeCursor?: stringOpaque exclusive sequence cursor for the preceding page; mutually exclusive with after_cursor.
Optionallimit?: numberMaximum entries to return, from 1 through 100.
Successful response
Update a domain-event subscription Updates matching, status, or queue limits for future fanout. Already queued deliveries remain unless a lower cap trims the oldest entries; retention changes apply to future deliveries only.
Subscription ID (esub_...).
Request body.
Optionalevent_names?: string[]Optionalfilter?: Record<string, unknown>Optional match over subject_key, actor_key, and allowlisted dims. Only valid when every event name is a custom (script-emitted) event type. Missing filter matches all events.
Optionalmax_pending_events?: numberOptionalname?: stringOptionalretention_seconds?: numberDelivery retention in seconds. Defaults to 86400 (24 hours); between 7200 and 2592000. Applies to future deliveries only.
Optionalstatus?: "active" | "paused"Optionalvisibility_timeout_seconds?: numberSuccessful response
Claim events from a subscription Atomically leases the oldest unacknowledged delivery. Returns an empty data array when the queue is empty or its head already has an active lease. Passing max_events opts into batch mode, where leased entries are skipped instead of blocking; wait_seconds bounds a long poll on an empty queue.