Skip to main content

HTTP API Reference

Call MediaSFU from your server with no SDK. Every resource below uses the same base URL, authentication and response format.

Authentication​

Authorization: Bearer <api-username>:<api-key>

Find both values under API keys. Send requests from your server only; never ship the key in a browser or mobile app. For short-lived, scoped access, use disposable keys.

Actions are selected with an action field: in the JSON body for POST, and in the query string for GET.

Resources​

ResourceEndpointWhat it does
Rooms / Sessions/v1/roomsEverything on MediaSFU runs inside a room — meetings, calls and AI agents all start here.
Event settings/v1/eventssettingsAccount-level defaults applied to new rooms — what participants may do, plus AI-notes wiring.
Recording settings/v1/recordingsettingsAccount-level recording defaults applied when rooms record.
Recordings/v1/recordingsList and fetch your recorded session files.
Account balance/v1/balanceRead remaining sandbox and production meeting and recording minutes.
Sub-users/v1/subusersTeam members that share your main account and billing. Parent-role sub-users can manage some of their own settings.
Allowed domains/v1/domainsDomains authorised to send create/join requests with your production API key. Required for any domain proxying those requests — embedding is irrelevant.
Disposable API keys/v1/disposable-keysShort-lived keys for embedding widgets or one-off integrations. The full value is shown only once on create.
AI credentials/v1/aicredentialsYour own AI provider keys (STT, LLM, TTS, realtime). Only needed if you are not using MediaSFU-managed AI.
SIP configuration/v1/sipconfigsBring your own number so an agent can answer or place calls. MediaSFU-provided numbers are for outgoing non-AI calls only.
Translation config/v1/translationconfigsNamed AI-notes / translation presets, wiring together your STT, LLM and TTS credentials.

Streaming (WHIP, WHEP and HLS) and AI call control have their own guides: Streaming and AI call control.

Responses and errors​

Every /v1 response is JSON. Success and failure share one shape, so a single handler covers both.

Success. HTTP 2xx. success is always true; the payload sits alongside it under a resource-named key.

{
"success": true,
"rooms": [
"…"
],
"total": 2,
"startIndex": 0,
"pageSize": 20
}

Failure. success is false, error is a message safe to show a user, and code is stable — branch on code, not on the text.

{
"success": false,
"error": "Room not found.",
"code": "NOT_FOUND"
}
CodeHTTP statusMeaning
BAD_REQUEST400The request was malformed or failed validation.
UNAUTHORIZED401Missing or unusable credentials.
FORBIDDEN403Authenticated, but not allowed to do this.
NOT_FOUND404No such record, or it is outside your account.
CONFLICT409Clashes with current state — e.g. the name is taken.
RATE_LIMITED429Too many requests. Back off and retry.
INTERNAL_ERROR500A fault on our side. Safe to retry.

Error messages never contain internal detail — no database identifiers, field paths or stack text. When something fails internally you get a generic message and the specifics stay in our logs.

Endpoints that return a plain array​

These return a plain JSON array today. Add ?envelope=1 (or the header X-MediaSFU-Response: envelope) to get the standard { success, data } shape instead. The array default will remain until every known caller has moved.

  • GET /v1/room/logs: Room usage logs, record usage logs and messages.
  • GET /v1/sipcall/logs: Call transcripts, summaries and callback state.

Try any request live in the API Sandbox.