Live Video API
Preview
REST · WebRTC · HLS

Live Video API

Two complementary products in one API: interactive WebRTC rooms for conversations, and live streaming for one-to-many broadcasts — RTMP/SRT in, HLS out, with recording, DVR, and webhooks.

Interactive rooms

Multi-party WebRTC sessions with capacity, metadata, and optional cloud recording.

Live streaming

One-to-many broadcast with RTMP/SRT ingest and adaptive HLS / LL-HLS playback.

Short-lived join tokens

Issue scoped client tokens (host, participant, viewer) without exposing REST credentials.

Regional media edge

Connect participants and ingest to the nearest region across Africa and beyond.

Recording & DVR

Room composites, stream VOD archives, and optional live DVR windows for viewers.

Lifecycle webhooks

Room join/leave, stream live/ended, and recording.ready events in real time.

Room join

<800ms

Token → media (p95)

Room size

50

Participants max

Stream viewers

100k+

CDN fan-out

LL-HLS latency

3–8s

Glass-to-glass target

How it works
  1. Your backend creates a room with POST /v1/video/rooms using Basic Auth.
  2. Your backend issues a join token per user with a role (host, participant, or viewer) and a TTL.
  3. Your client loads the Sendexa Video Web SDK (or native SDK) with the room ID and join token — never your REST secret.
  4. Participants publish/subscribe media through the regional SFU. Optional cloud recording composites the session when the room ends.
  5. Webhooks notify your backend of room lifecycle, joins/leaves, and recording readiness.
text
Browser / App Your Backend Sendexa
| | |
| request session | |
|----------------------------->| POST /v1/video/rooms |
| |------------------------->|
| | roomId, region |
| |<-------------------------|
| | POST .../tokens |
| |------------------------->|
| roomId + join token | token, expiresAt |
|<-----------------------------| |
| SDK connect(roomId, token) | |
|-------------------------------------------------------->|
| WebRTC media (SFU) | |
|<=======================================================>|
| | webhooks (lifecycle) |
| |<-------------------------|
Quick start

Create a room and mint a host token in two requests. Base URL: https://api.sendexa.co

Bash
# 1. Create a room
curl -X POST 'https://api.sendexa.co/v1/video/rooms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \
-d '{
"name": "Support Session #1042",
"maxParticipants": 4,
"record": true,
"metadata": { "ticketId": "TKT-1042" }
}'
# 2. Issue a host join token (replace ROOM_ID)
curl -X POST 'https://api.sendexa.co/v1/video/rooms/ROOM_ID/tokens' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \
-d '{
"identity": "agent-ada",
"role": "host",
"ttl": 3600
}'

Example create-room response

JSON
{
"success": true,
"code": "VIDEO_ROOM_CREATED",
"message": "Video room created successfully.",
"requestId": "REQ-1782001000001",
"timestamp": "2026-07-12T10:15:00.000Z",
"data": {
"roomId": "rm_8f3a2c1b0e9d",
"name": "Support Session #1042",
"status": "ready",
"maxParticipants": 4,
"participantCount": 0,
"record": true,
"region": "af-west",
"metadata": { "ticketId": "TKT-1042" },
"createdAt": "2026-07-12T10:15:00.000Z",
"emptyTimeoutSeconds": 300
}
}

Next: full getting-started guide including Web SDK embed and media constraints.

Participant roles
RolePublishSubscribeRoom control
host
Camera, mic, screenAll tracksMute others, end room (client API)
participant
Camera, mic, screenAll tracksSelf only
viewer
NoneAll tracksNone
Media regions

Rooms are pinned to a media region at creation time (auto-selected from client IP heuristics or set explicitly when supported). Participants connect to the SFU in that region for optimal RTT.

af-west

Africa West

Accra / Lagos edge

af-south

Africa South

Johannesburg

eu-west

Europe West

London / Frankfurt

us-east

US East

Virginia

Common use cases
Telehealth & support

1:1 or small-group consults with recording for compliance. Use host for clinicians and participant for patients.

Live classes & webinars

One host, many viewers. Raise capacity, keep most clients on viewer tokens to reduce uplink load.

Interviews & KYC video

Short-lived rooms with strict TTL tokens and webhook-driven archival when video.recording.ready fires.

Room statuses
StatusMeaningTypical next step
readyRoom provisioned; waiting for first participantIssue tokens and connect clients
activeAt least one participant connectedSession in progress; monitor webhooks
endedSession closed via /end or empty timeoutAwait recording.ready if record=true
deletedRoom resource removed via DELETECreate a new room for a new session
Common error codes
HTTPCodeCause
400INVALID_ROOM_PARAMSmaxParticipants out of range or invalid metadata
401UNAUTHORIZEDMissing or invalid Basic Auth on REST calls
403VIDEO_NOT_ENABLEDLive Video not enabled on this business account
404ROOM_NOT_FOUNDroomId does not exist or was deleted
409ROOM_ALREADY_ENDEDCannot mint tokens or join an ended room
429RATE_LIMIT_EXCEEDEDToo many room/token requests — back off and retry