Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Stream inbox events

BillionSend extension: a server-sent event stream of every inbox event of the team, named like the webhook events (inbox.email.received, inbox.thread.created, email.received, …; types narrows them), each carrying the webhook payload’s data. Send the key as a Bearer header; the stream stays open, and a client that reconnects with Last-Event-ID resumes without losing events. Needs a team-wide key: a key held to one domain streams one inbox at a time. An agent (an inbox-scoped key, or an MCP connection) never receives the events about held mail (inbox.email.quarantined), replay included, and naming them in types is a 403. A stream closes within a few seconds once its key is revoked, its person leaves the team or its inbox is gone; it is also closed every ten minutes or so, and the client reconnects with Last-Event-ID. Streams are capped per key and per team on each API process (429 too_many_streams).

GET/inboxes/events
Authorization
AuthorizationBearer token · headerrequired

A BillionSend API key (bs_…).

Query parameters
typesstring

Comma-separated event names to receive (inbox.email.received, email.received, and the other inbox.* webhook events); every inbox event when omitted

last_event_idstring

The id of the last event the client saw, for clients that cannot set the Last-Event-ID header; the header wins when both are sent

Responses
200

An event stream that stays open. A client that reconnects with Last-Event-ID gets the events it missed (up to 24 hours back, then a stream.gap event) before the live ones

string
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequired
namestringrequired
messagestringrequired
403

A key held to one domain or one inbox, or an agent naming an event about held mail

statusCodenumberrequired
namestringrequired
messagestringrequired
422

Validation error

statusCodenumberrequired
namestringrequired
messagestringrequired
429

Too many streams open, or the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberrequired
namestringrequired
messagestringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.billionsend.com/inboxes/events' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
"string"

Was this page helpful?