List events

GET
/v1/events

Returns events after a cursor, oldest first, with the cursor to pass next time. Use it when you cannot receive webhooks or keep a stream open — a cron job, a serverless function. With waitSec, an empty page waits for the next event (long polling).

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

The cursor from your previous page. Leave it out to start at the oldest event.

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
limit?integer

How many items to return, 1–500. Default 100.

Range1 <= value <= 500
from?string

Where to start without after: oldest (the default) or now.

Value in"oldest""now"
waitSec?|

When there is nothing new yet, wait up to this many seconds (1–25) for the first event.

Range0 <= value <= 25

Response Body

Committed public events after the cursor, oldest first

application/json
  1. response
events*array<>
cursor*string
hasMore*boolean
Example Request
curl "https://api.vlayers.ai/v1/events?types=message.*&limit=100" \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "events": [    {      "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"      }    }  ],  "cursor": "MDE5MmY1YjEtMGExYi03YzJk",  "hasMore": false}