API reference
Every endpoint, WebSocket command, and event. Full machine-readable spec at /v1/openapi.json.
On this page
Base URL & auth
All REST endpoints live at https://kardocloud.com/v1. Every request needs a Bearer token in Authorization:
- Server-to-server:
Authorization: Bearer kl_live_<your api key> - Logged-in user (dashboard):
Authorization: Bearer <tenant JWT from /auth/login>
Some endpoints (/me/channels/token, /me/sessions/:id/token) accept either.
Projects & API keys
| Method | Path | Description |
|---|---|---|
| GET | /me/projects | List projects |
| POST | /me/projects | Create project |
| GET | /me/projects/:id | Get one |
| PATCH | /me/projects/:id | Update |
| DELETE | /me/projects/:id | Archive |
| PATCH | /me/projects/:id/features | Toggle features |
| GET | /me/projects/features/catalog | List feature codes |
| GET | /me/projects/:id/keys | List keys |
| POST | /me/projects/:id/keys | Create key (returns fullKey ONCE) |
| DELETE | /me/projects/:id/keys/:keyId | Revoke key |
Channels (chat)
| Method | Path | Description |
|---|---|---|
| GET | /me/channels | List channels (filter ?projectId, ?type) |
| POST | /me/channels | Create — type: direct / group / public / stream |
| GET | /me/channels/:id | Get + members |
| PATCH | /me/channels/:id | Update name, avatarUrl, description, externalRef (group/public/stream only) |
| DELETE | /me/channels/:id | Archive |
| POST | /me/channels/:id/members | Add member |
| DELETE | /me/channels/:id/members/:userId | Remove member |
| POST | /me/channels/token | Mint chat JWT for an end-user |
| POST | /me/channels/uploads/url | Pre-signed S3 PUT for attachments (25 MB cap) |
| GET | /me/channels/search/messages?q=… | Full-text search |
| GET | /me/channels/analytics/summary | KPIs for dashboard |
Channel messages
| Method | Path | Description |
|---|---|---|
| GET | /me/channels/:id/messages | List (?limit, ?before, ?parentId) |
| POST | /me/channels/:id/messages | Send (with optional parentId, mentions[], attachments[]) |
| PATCH | /me/channels/:id/messages/:msgId | Edit body |
| DELETE | /me/channels/:id/messages/:msgId | Soft delete (redact) |
| POST | /me/channels/:id/read | Mark channel read up to now |
Streams (RTMP/HLS)
| Method | Path | Description |
|---|---|---|
| GET | /me/streams | List |
| POST | /me/streams | Create (mode: REALTIME / LOW_LATENCY / BROADCAST) |
| GET | /me/streams/:id | Get + keys + sessions + recordings |
| POST | /me/streams/:id/rotate-key | Rotate publish key |
| POST | /me/streams/:id/sfu-token | Mint SFU JWT (legacy stream-bound) |
| POST | /me/streams/:id/recordings/start | Start recording |
| POST | /me/streams/:id/recordings/:recId/stop | Stop |
| POST | /me/streams/:id/transcription/start | Enable live captions |
| POST | /me/streams/:id/transcription/stop | Disable |
Sessions
| Method | Path | Description |
|---|---|---|
| GET | /me/sessions | List (filter ?type, ?state, ?projectId) |
| POST | /me/sessions | Create (type: livestream / call / conference / webinar) |
| GET | /me/sessions/:id | Get + participants + recordings |
| PATCH | /me/sessions/:id | Update layout / lock / watermark |
| POST | /me/sessions/:id/start | Move waiting → live |
| POST | /me/sessions/:id/end | End |
| POST | /me/sessions/:id/token | Mint SFU + chat JWT for an end-user |
| GET | /me/sessions/:id/participants | List |
| POST | /me/sessions/:id/participants | Add invite |
| PATCH | /me/sessions/:id/participants/:userId | Change role / perms |
| DELETE | /me/sessions/:id/participants/:userId | Kick |
| POST | /me/sessions/:id/moderate/mute-all | Mute everyone (except hosts by default) |
| POST | /me/sessions/:id/moderate/spotlight | Pin a participant (or clear with userId:null) |
| POST | /me/sessions/:id/moderate/hand-raise | Raise hand |
| POST | /me/sessions/:id/moderate/hand-lower | Lower hand |
| POST | /me/sessions/:id/moderate/promote | Promote to cohost/guest |
| POST | /me/sessions/:id/recording/start | Composite recording (layout-aware) |
| POST | /me/sessions/:id/recording/:recId/stop | Stop recording |
| GET | /me/sessions/:id/recordings | List recordings |
| POST | /me/sessions/:id/breakouts | Spawn N child sessions with optional assignments |
| GET | /me/sessions/:id/breakouts | List child sessions |
| POST | /me/sessions/:id/breakouts/close | End all child sessions |
| GET | /me/sessions/:id/summary | Fetch AI summary (TLDR + highlights + action items + decisions) |
| POST | /me/sessions/:id/summary | Manually set a summary (used by worker) |
| GET | /me/sessions/analytics/summary | KPIs |
Calls (1:1)
| Method | Path | Description |
|---|---|---|
| POST | /me/calls/invite | Create call session + push the callee |
| POST | /me/calls/:sessionId/answer | Callee accepts |
| POST | /me/calls/:sessionId/decline | Callee declines |
| POST | /me/calls/:sessionId/end | Either party ends |
Push devices & credentials
| Method | Path | Description |
|---|---|---|
| POST | /me/push/devices | Register APNs/FCM token for a user |
| GET | /me/push/devices/:userId | List user's devices |
| DELETE | /me/push/devices/:token | Unregister |
| GET | /me/push/projects/:projectId/credentials | Show push config status |
| POST | /me/push/projects/:projectId/credentials/fcm | Upload Firebase service-account JSON |
| POST | /me/push/projects/:projectId/credentials/apns | Upload APNs .p8 + team/key/bundle IDs |
Recordings
| Method | Path | Description |
|---|---|---|
| GET | /me/recordings | List |
| GET | /me/recordings/:id/playback-url | Get signed playback URL |
| POST | /me/recordings/:id/transcode | Transcode to other formats |
| GET | /me/transcodes/:jobId | Job status |
Webhooks (registration)
| Method | Path | Description |
|---|---|---|
| GET | /me/webhooks | List |
| POST | /me/webhooks | Register URL + event list (returns secret ONCE) |
| DELETE | /me/webhooks/:id | Delete |
| GET | /me/webhooks/:id/deliveries | Recent deliveries (success + failure) |
| POST | /me/webhooks/deliveries/:id/retry | Retry a failed delivery |
WebSocket protocol — chat
URL: wss://chat.kardocloud.com/v1/chat/socket?room=<channelId>&token=<jwt>
Envelope: { "type": <command|event>, "data": <payload> }
Client → server commands
chat.send { id?, body, parentId?, mentions?, attachments? }
chat.edit { id, body } (author only)
chat.delete { id }
read.mark { upTo? }
typing.start {}
typing.stop {}
reaction.add { messageId?, emoji }
reaction.remove { messageId?, emoji }
poll.create { question, options[], durationSec } (host)
poll.vote { pollId, optionIdx }
poll.close { pollId } (host)
qa.ask { body }
qa.upvote { qaId }
qa.answer { qaId, body } (host)
gift.send { kind, amountCents, recipientId? }
superchat.send { body, amountCents, currency }
mod.timeout { userId, durationSec } (host)
mod.ban / unban { userId } (host)
mod.mute / unmute { userId } (host)
mod.delete { messageId } (host)
mod.slowmode { onSec } (host)
mod.bannedwords { words[] } (host)
Server → client events
welcome { you, room, viewers, slowmode, bannedWords[] }
chat { id, authorId, authorName, body, parentId?, at }
chat.edited { id, body, at, by }
chat.deleted { id, by }
read { userId, name, upTo }
typing { userId, name, on }
reaction { messageId?, emoji, count }
poll { id, question, options[], state, endsAt? }
qa { id, authorName, body, upvotes, answer? }
gift { senderId, kind, amountCents, at }
superchat { id, senderId, body, amountCents, currency, pinnedUntil }
mod.action { kind, target?, by, reason? }
presence { viewers }
system { body }
error { code, message }
WebSocket protocol — SFU
URL: wss://sfu.kardocloud.com/?token=<jwt>&room=<sessionId or streamId>
JSON-RPC 2.0-like:
// client → server
{ "id": "1", "type": "request", "method": "getRouterRtpCapabilities", "params": {} }
// server → client (reply)
{ "id": "1", "type": "response", "result": { "rtpCapabilities": {...} } }
// or error
{ "id": "1", "type": "response", "error": { "msg": "..." } }
// server → client (push notify)
{ "type": "notify", "method": "new-producer", "params": { peerId, producerId, kind } }
RPC methods
getRouterRtpCapabilities()
join({ rtpCapabilities, displayName })
createWebRtcTransport({ direction: 'send' | 'recv' })
connectTransport({ transportId, dtlsParameters })
produce({ transportId, kind, rtpParameters })
consume({ producerId, rtpCapabilities })
resumeConsumer({ consumerId })
Notifications
peer-joined { peerId, displayName }
peer-left { peerId }
new-producer { peerId, producerId, kind }
producer-closed { producerId }
Use mediasoup-client to handle the heavy lifting — see React quickstart.
WHIP / WHEP HTTP
| Method | Path | Description |
|---|---|---|
| POST | https://kardocloud.com/rtc/v1/whip/?app=live&stream=<key> | SRS WHIP — publish to a stream by key (RTMP-backed) |
| POST | https://kardocloud.com/rtc/v1/whep/?app=live&stream=<key> | SRS WHEP — sub-2s playback |
| POST | https://sfu.kardocloud.com/whip/<roomId> | mediasoup WHIP — publish to a session |
| POST | https://sfu.kardocloud.com/whep/<roomId>/<peerId> | mediasoup WHEP — consume one peer |
Body: SDP offer (Content-Type: application/sdp). Response: SDP answer + Location header for the resource.
Machine-readable
For codegen: /v1/openapi.json · Swagger UI: /Live/Developer/swagger.