Skip to content
Get Started

Stream account events

GET/api/v2/events

Opens an authenticated Server-Sent Events stream scoped exclusively to the account resolved by the supplied credentials. The stream is live and intentionally not a durable replay log. It sends a heartbeat every 15 seconds and rotates after at most 15 minutes. A temporary-token stream closes no later than that token’s expires_at; clients should reconnect and repair gaps via:

  • GET /api/v2/messages?updated_at_gte=...&order_by=updated_at&order_direction=asc
  • GET /api/v2/contacts?created_at_gte=...&order_by=created_at&order_direction=asc
  • GET /api/v2/lines/state
  • GET /api/v2/verify/verifications?updated_at_gte=...

Each event contains a stable id, a type, occurred_at, and a minimal data object. Consumers must deduplicate by ID. Typing indicators are ephemeral and cannot be recovered.

Query ParametersExpand Collapse
types: optional string

Optional comma-separated allowlist of event types

ReturnsExpand Collapse
AccountEvent object { id, data, occurred_at, 2 more }
id: string
data: map[unknown]
occurred_at: string
type: "message.received" or "message.created" or "message.updated" or 9 more
One of the following:
"message.received"
"message.created"
"message.updated"
"typing.changed"
"line.assigned"
"line.unassigned"
"line.status.changed"
"line.blocked"
"contact.created"
"verification.approved"
"verification.expired"
"verification.canceled"
version: 1
AccountEvent object { id, data, occurred_at, 2 more }
id: string
data: map[unknown]
occurred_at: string
type: "message.received" or "message.created" or "message.updated" or 9 more
One of the following:
"message.received"
"message.created"
"message.updated"
"typing.changed"
"line.assigned"
"line.unassigned"
"line.status.changed"
"line.blocked"
"contact.created"
"verification.approved"
"verification.expired"
"verification.canceled"
version: 1

Stream account events

curl https://api.sendblue.co/api/v2/events \
    -H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
    -H "sb-api-secret-key: $SENDBLUE_API_API_SECRET"
Returns Examples