Docs menu

Stream events

GET/v1/events

  • Scope messages:read

Server-Sent Events: each event arrives as event: <type> and data: <event JSON>, the same JSON webhooks get. Live only: events from before you connected aren't replayed, so use webhooks for anything you must not miss. A comment line every 15 seconds keeps the connection open.

Parameters

Query

  • profile_idstring

    Only this line's events.

  • typesstring

    Comma-separated event types, such as message.received,message.sent.

Response

200 OKA stream of events.

A stream of text/event-stream messages; each data: line is one event:

  • idstringrequired

    evt_…

  • object"event"required

  • type"message.received" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.fallback" | "message.reaction" | "draft.created" | "draft.approved" | "draft.rejected" | "chat.updated" | "profile.online" | "profile.offline" | "call.ringing" | "call.answered" | "call.transferred" | "call.ended" | "call.voicemail" | "call.transcription" | "calling.cap_warning" | "webhook.test"required

  • created_attimestamprequired

  • profile_idstring or nullrequired

  • datamaprequired

    Depends on type: { message } for message.*, { draft } for draft.*, { call } for call.*, { chat, changed, by } for chat.updated.

Errors

StatusCodeMeans
400validation_failedA field is missing or invalid.
401unauthorizedThe API key is missing, unknown or revoked.
403insufficient_scopeThe API key lacks the scope this needs.
404not_foundNo such object, or the key can't see it.

Every error is { "error": { "code", "message" } }. All error codes.

Keys come with your first line.

Request an invite and we'll set up a line for your team. API access is part of every plan.

Request an invite