跳到内容
Esc
↑↓导航↵打开⌘J预览

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
授权
AuthorizationBearer 令牌 · header必填

A BillionSend API key (bs_…).

查询参数
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

响应
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

statusCodenumber必填
namestring必填
messagestring必填
403

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

statusCodenumber必填
namestring必填
messagestring必填
422

Validation error

statusCodenumber必填
namestring必填
messagestring必填
429

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

statusCodenumber必填
namestring必填
messagestring必填
试一试
服务器
授权
参数
请求
curl -X GET 'https://api.billionsend.com/inboxes/events' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
响应
"string"

这个页面有帮助吗?