Developer docs

Everything you need to add calls to your app. Need a hand? Email support@videocallapi.com.

Quickstart

  1. Create a free account and verify your email.
  2. In the console, open API keys and create a key. Store the secret on your server.
  3. Install the SDK: npm i @videocallapi/react-sdk
  4. 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 pathPurpose
POST /v2/roomsCreate a room
GET /v2/rooms · GET /v2/rooms/:roomIdList rooms or fetch one
GET /v2/rooms/validate/:roomIdCheck that a room exists and is active
POST /v2/rooms/deactivate · /activateDisable or re-enable a room
GET /v2/sessions · GET /v2/sessions/:idCall history and participants
POST /v2/sessions/endEnd a call in progress
POST /v2/sessions/participants/removeRemove a participant
POST /v2/recordings/start · /endStart or stop recording
GET /v2/recordings · GET /v2/recordings/:idList recordings and get download links
GET /v2/public/rsa-public-keyPublic 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() and stopRecording().

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

ProfileSettingsUse for
High (default)Opus 48 kHz stereo, 128 kbps, RED, DTX off, echo cancellation onMost calls, including on speakers
StudioTrue stereo capture, 192 kbps, voice processing offMusic, tutoring, podcasts (headphones required)
SpeechMono speech optimised, low bandwidthPoor networks and very large calls

Meetings and invite links

For calls with people outside your app (interviews, sales demos, support sessions, KYC checks), create meetings and send each participant their own link. The link opens the hosted call page, where they check camera and microphone and join. No account and no meeting id.

  • Meeting types (console → Meetings → Meeting types) define what a kind of meeting needs: its purpose, your own fields (meeting-level such as a job description, or per participant), an optional AI agent, default duration and time zone.
  • Create meetings in the console one at a time, or upload a sheet (.xlsx or .csv): one row per participant; rows sharing a "group" value become one meeting with several participants. Columns are matched to fields automatically, every row is checked before anything is created, and you can download the sheet back with a join link per row, or email the links.
  • Scheduled meetings open a few minutes before the start time (set per type) and close after the end; before that the link shows when it opens.
  • Listen in (hidden): from the console, staff can open a private host link for any meeting. They join invisibly (participants and the AI agent can't see or hear them, and they are not in the recording), see live captions, and can at any time join the conversation or take over from the AI (the agent leaves). Invisibility is enforced by the media server, not the app.
  • With an AI agent, the meeting's fields become the agent's variables, plus {{meeting_title}}, {{meeting_purpose}}, {{participant_name}} and {{participant_names}}.
curl -X POST https://api.videocallapi.com/v2/meetings \
  -H "Authorization: $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "typeId": "<from GET /v2/meeting-types>",
    "data": { "job_role": "Forward Deployed Engineer" },
    "scheduledStart": "2026-11-10 10:30",
    "participants": [{ "name": "Asha Rao", "email": "asha@example.com" }],
    "sendEmails": true
  }'
# → { "id", "roomId", "title", "participants": [{ "id", "name", "email", "url" }] }

Voice agents (AI interviewer)

Bring your own realtime voice agent into a call, for example an AI interviewer that talks to a candidate. The agent joins as a participant, hears the people in the call, speaks into it and is part of the recording. Set your agent gateway URL and API key once in the console under Voice agent; the key is stored encrypted.

Attach an agent when you create the room, and it joins as soon as the candidate arrives:

curl -X POST https://api.videocallapi.com/v2/rooms \
  -H "Authorization: $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "agent": {
      "agentId": "interviewer-backend",
      "name": "AI Interviewer",
      "callerRef": "candidate-1042",
      "variables": { "job_role": "Backend Engineer", "candidate_name": "Priya", "job_description": "..." }
    }
  }'

Or control it in any room:

Method and pathPurpose
POST /v2/rooms/:roomId/agentStart an agent (body as agent above; defaults to the room's agent)
GET /v2/rooms/:roomId/agentStatus, end reason and transcript
DELETE /v2/rooms/:roomId/agentRemove the agent from the call
GET /v2/sessions/:sessionId/transcriptFull transcript of a call
POST /v2/rooms/:roomId/invitesShareable link for a candidate: { "title", "participantName"?, "expiresInHours" } → { "url", "expiresAt" }. List with GET, revoke with DELETE /v2/rooms/:roomId/invites/:code.
  • Invite links open the call directly in the hosted web app: the candidate checks camera and microphone, types their name and joins. Use "candidate_name": "{{participant.name}}" to greet them by the name they enter.
  • Variables fill {{name}} placeholders in the agent's instructions: up to 10, 4,000 characters each and 8,000 in total. callerRef lets the agent remember the same candidate across calls.
  • Recorded from the first word: on accounts that record every call, the agent starts talking only once the recording is live.
  • Natural turn-taking: if the candidate starts speaking while the agent is talking, the agent stops and listens.
  • Live captions: both sides are sent to the call on the AGENT_TRANSCRIPT pubsub topic as they are spoken. Read them with usePubSub("AGENT_TRANSCRIPT", { onMessageReceived }). payload.role is agent or participant; messages with the same payload.turn are one sentence, updated word by word (payload.final: false) and then completed (payload.final: true). Only finished sentences are kept in the call's message history and transcript.
  • Ending: when the agent ends the conversation, the call ends for everyone and the recording is finalised.
  • Webhooks: agent-started and agent-ended (with reason: agent-ended-call, stopped, participants-left, meeting-ended, no-participant or error).
  • Billing: the agent counts as one participant at the audio-only rate.

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 agent-started agent-ended

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

CodeMeaning
4026Your plan's concurrent-call limit is reached (2 on Free). Wait for a call to end, or upgrade.
4021The feature isn't on your plan (recording on Free), or this month's free minutes are used up.
4003The room ID doesn't exist. Create the room first.
3068The SDK feature isn't supported yet (for example HLS or transcription).

Questions? Email support@videocallapi.com.