A partner creates rooms for you
Give an agency or reseller a key that can only create and update rooms, for as long as the contract runs.
createRoom · updateRoomA disposable key does only the operations you pick, from only the domains you list, until the date you set. Revoke it with one request and your main key never changes.
New to keys? Start with how API keys work.
Give an agency or reseller a key that can only create and update rooms, for as long as the contract runs.
createRoom · updateRoomLet a scheduler, CRM or automation open rooms on your account without ever seeing your main key.
createRoomHand a dialer the right to place, watch and end phone calls, and nothing else.
initiateCalls · sipCallState · sipCallEndStart and stop recording, run polls or remove a participant in a running meeting from a separate tool.
meetingControlCall with your main credentials, or click Create in the dashboard. The key itself is shown once, in the response.
| Field | What it sets |
|---|---|
type | tempsand for building, tempprod for live traffic |
domains | Required for tempprod. Optional for tempsand; if you set it, it is enforced |
validityDays | Days until it expires. Leave it out or send 0 for no expiry |
allowedOperations | Operations it may call. Leave it out to allow the 14 standard ones; the two AI read operations are added only when you list them |
roomLimits | Optional ceilings on the rooms it creates: maxDurationMinutes (1 to 1440), maxCapacity (1 to 1000), eventTypes and allowRecording. With limits set, recording stays off unless allowRecording is true |
name | Your label, unique on your account. Used to find, update and revoke it |
curl -X POST https://mediasfu.com/v1/disposable-keys \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "create",
"name": "acme-booking",
"type": "tempprod",
"domains": ["booking.acme.com"],
"validityDays": 30,
"allowedOperations": ["createRoom", "updateRoom"]
}'The disposable key takes the place of your API key in the same header. Every endpoint it is allowed to call works exactly as documented.
Authorization: Bearer your-api-username:tempprod…# The partner uses YOUR username with the disposable key.
# Outside a browser, send an Origin from one of the key's domains.
curl -X POST https://mediasfu.com/v1/rooms \
-H "Authorization: Bearer your-api-username:tempprod7c1e…" \
-H "Origin: https://booking.acme.com" \
-H "Content-Type: application/json" \
-d '{
"action": "create",
"userName": "host",
"duration": 30,
"capacity": 5,
"eventType": "conference"
}'Grant only what the integration calls. You can change the list later without issuing a new key. The AI notes and logs operations are never included by default: a key holds them only when you list them.
createRoomupdateRoomdeleteRoomcreateEventSettingsupdateEventSettingsmeetingControlinitiateCallssipCallListsipCallSummarysipCallStatesipCallEndsipCallControlexternalMediaIngestexternalMediaPlaybackroomNotesReadaiFlowLogsReadLook keys up by name, see how much each one is used, widen or narrow what it can do, and switch it off when the work ends.
curl "https://mediasfu.com/v1/disposable-keys" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY"
# One key by name
curl "https://mediasfu.com/v1/disposable-keys?name=acme-booking" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY"| Plan | Active keys | Requests per minute, per key | Domains per production key |
|---|---|---|---|
| Basic | 1 | 30 | 1 |
| Standard | 3 | 90 | 4 |
| Advanced | 10 | 300 | 10 |
The key passed its validityDays or was revoked. Create a new one; a key can't be renewed.
The request's Origin (or Referer) isn't on the key's list, or it had none: calls from a server must send an Origin header for a listed domain. Add a missing domain with an update. After 10 refused requests like this the key switches itself off, and you create a new one.
Each key has its own per-minute budget (see the table above). The error says when the window resets.
Your plan's active-key limit is used up. Revoke a key you no longer need, or move to a larger plan.
The key has room limits that name other event types. Use one of those types, or create a key whose limits include this one.
Check that the operation is in the key's allowedOperations and that the Authorization header uses your account username, not the key's name.
Disposable keys are for other people's code. Your own app should create rooms from your backend.