Stream events

GET
/v1/events/stream

Opens a Server-Sent Events stream: it replays the events after your cursor, then sends new ones as they happen. Each frame carries its cursor as id:; reconnect with the last one in Last-Event-ID and nothing is missed or repeated. A heartbeat comment arrives every 15 seconds.

The stream replays up to 7 days; an older cursor is refused with 410 cursor_expired (page through GET /v1/events from it instead).

Requires an API key with the events:read scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Query Parameters

after?string

Resume after this cursor. Leave it out to start live, from now.

Length1 <= length
types?string

Comma-separated event types, or a prefix with .*.

conversationId?string

Only events of this conversation.

Formatuuid
channel?string

Only events of this channel's messages.

Length1 <= length <= 64

Header Parameters

last-event-id?string

The last cursor you processed. Takes precedence over after; SSE clients send it for you on reconnect.

Response Body

An event stream; each data is a PublicEventEnvelope

text/event-stream
  1. response
id*string
Formatuuid
type*string
Value in"message.received""message.sent""message.delivered""message.failed""conversation.created""conversation.controller_changed"
createdAt*string
Formatdate-time
livemode?boolean
Defaulttrue
data*
Example Request
curl -N "https://api.vlayers.ai/v1/events/stream?types=message.*" \  -H "Authorization: Bearer $VOICELAYER_API_KEY" \  -H "Accept: text/event-stream"
Example Response
{  "id": "0192f5b1-0a1b-7c2d-8e3f-4a5b6c7d8e90",  "type": "message.received",  "createdAt": "2026-10-20T15:04:05.000Z",  "livemode": false,  "data": {    "messageId": "0192f5b0-8d1f-7b62-8c3e-5f9a2b7d4e32",    "conversationId": "0192f5b0-7c3e-7a51-9b2d-4e8f1a6c3d21",    "channel": "sms",    "direction": "inbound",    "bindingId": null,    "status": "received",    "text": "Do you have a table for two tonight?",    "author": null,    "error": null,    "metadata": {},    "occurredAt": "2026-10-20T15:04:05.000Z"  }}