Developer docs
Everything you need to add calls to your app. Need a hand? Email support@videocallapi.com.
Quickstart
- Create a free account and verify your email.
- In the console, open API keys and create a key. Store the secret on your server.
- Install the SDK:
npm i @videocallapi/react-sdk - On your server, sign a token and create a room. In the browser, join it.
Authentication tokens
Every REST request and every call join uses a JWT signed with your API secret (HS256). Sign tokens on your server only; never ship the secret to browsers.
import jwt from "jsonwebtoken"; const token = jwt.sign( { apikey: process.env.VIDEOCALLAPI_KEY, permissions: ["allow_join"] }, process.env.VIDEOCALLAPI_SECRET, { algorithm: "HS256", expiresIn: "2h" } );
Permissions: allow_join joins directly; ask_join waits in the lobby; allow_mod can end the call and remove participants. To limit a token to one room, add roomId; to fix the participant's identity, add participantId.
Create a room
curl -X POST https://api.videocallapi.com/v2/rooms \ -H "Authorization: $TOKEN" -H "Content-Type: application/json" \ -d '{"customRoomId": "consult-1042"}' # → { "roomId": "abcd-efgh-ijkl", "customRoomId": "consult-1042", ... }
Join from React
import { MeetingProvider, useMeeting, useParticipant, VideoPlayer } from "@videocallapi/react-sdk"; <MeetingProvider token={token} config={{ meetingId: roomId, name: "Asha", micEnabled: true, webcamEnabled: true }} joinWithoutUserInteraction > <Room /> </MeetingProvider>
The SDK connects to https://api.videocallapi.com by default. If you need to change it, set VITE_VIDEOCALLAPI_URL, NEXT_PUBLIC_VIDEOCALLAPI_URL or REACT_APP_VIDEOCALLAPI_URL at build time.
REST API reference
Base URL https://api.videocallapi.com. Send the token in the Authorization header.
| Method and path | Purpose |
|---|---|
POST /v2/rooms | Create a room |
GET /v2/rooms · GET /v2/rooms/:roomId | List rooms or fetch one |
GET /v2/rooms/validate/:roomId | Check that a room exists and is active |
POST /v2/rooms/deactivate · /activate | Disable or re-enable a room |
GET /v2/sessions · GET /v2/sessions/:id | Call history and participants |
POST /v2/sessions/end | End a call in progress |
POST /v2/sessions/participants/remove | Remove a participant |
POST /v2/recordings/start · /end | Start or stop recording |
GET /v2/recordings · GET /v2/recordings/:id | List recordings and get download links |
GET /v2/public/rsa-public-key | Public key for verifying webhooks |
Recording
Recording is available on the Pay-as-you-go and Enterprise plans. Each account has a recording policy:
- Every call (guaranteed): recording starts automatically. Participants don't receive media until it's running, and it restarts automatically if interrupted.
- Client controlled: your app calls
startRecording()andstopRecording().
Recordings are MP4 (H.264 video, 48 kHz stereo AAC audio) in SD, HD or Full HD. Download links from the API are signed and valid for 7 days.
Audio quality
| Profile | Settings | Use for |
|---|---|---|
| High (default) | Opus 48 kHz stereo, 128 kbps, RED, DTX off, echo cancellation on | Most calls, including on speakers |
| Studio | True stereo capture, 192 kbps, voice processing off | Music, tutoring, podcasts (headphones required) |
| Speech | Mono speech optimised, low bandwidth | Poor networks and very large calls |
Webhooks
Set your endpoint in the console under Webhooks. We send a JSON POST for each event and retry failed deliveries with backoff. Events:
session-started session-ended participant-joined participant-left recording-starting recording-started recording-stopping recording-stopped recording-failed
Each request has an x-videocallapi-signature header: a base64 RSA-SHA256 signature of the JSON body.
import crypto from "node:crypto"; const { publicKey } = await (await fetch("https://api.videocallapi.com/v2/public/rsa-public-key")).json(); function verify(body, signature) { return crypto.createVerify("RSA-SHA256") .update(JSON.stringify(body)) .verify(publicKey, signature, "base64"); }
Plan limits and errors
| Code | Meaning |
|---|---|
4026 | Your plan's concurrent-call limit is reached (2 on Free). Wait for a call to end, or upgrade. |
4021 | The feature isn't on your plan (recording on Free), or this month's free minutes are used up. |
4003 | The room ID doesn't exist. Create the room first. |
3068 | The SDK feature isn't supported yet (for example HLS or transcription). |
Questions? Email support@videocallapi.com.