Disposable keys

Give a partner API access without giving them your key.

A 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.

  • ScopedAny of 16 operations: rooms, room defaults, running meetings, phone calls, streams, AI notes.
  • Domain-lockedProduction keys answer only requests from the domains you list.
  • ExpiringValid for the number of days you choose, or until you revoke it.
  • RevocableOne request stops it. Your main key and other integrations carry on.
When to use one

Hand out exactly the access a job needs

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 · updateRoom

A booking or no-code tool

Let a scheduler, CRM or automation open rooms on your account without ever seeing your main key.

createRoom

An outbound calling job

Hand a dialer the right to place, watch and end phone calls, and nothing else.

initiateCalls · sipCallState · sipCallEnd

A live operator console

Start and stop recording, run polls or remove a participant in a running meeting from a separate tool.

meetingControl
1From your server

Create a key

Call with your main credentials, or click Create in the dashboard. The key itself is shown once, in the response.

FieldWhat it sets
typetempsand for building, tempprod for live traffic
domainsRequired for tempprod. Optional for tempsand; if you set it, it is enforced
validityDaysDays until it expires. Leave it out or send 0 for no expiry
allowedOperationsOperations it may call. Leave it out to allow the 14 standard ones; the two AI read operations are added only when you list them
roomLimitsOptional 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
nameYour 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"]
  }'
2Where the partner works

Use it like a normal key

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…
  • Your account username stays the same; only the key part changes.
  • Usage is billed to your account, like any other request.
# 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"
  }'
A request for an operation the key doesn't have is refused; the rest of your account stays out of reach.
Allowed operations

Sixteen operations, grouped by what they touch

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.

Rooms

createRoom
Create rooms (POST /v1/rooms, action create)
updateRoom
Change a room's settings
deleteRoom
End and remove a room

Room defaults

createEventSettings
Create default room settings (/v1/eventssettings)
updateEventSettings
Change default room settings

Running meetings

meetingControl
Start, stop, pause and resume recording; remove or ban a participant; polls; breakout rooms; media settings (/v1/meetings/:meetingID/…)

Phone calls

initiateCalls
Place outbound calls
sipCallList
List active calls
sipCallSummary
Read call summaries
sipCallState
Check a call's state
sipCallEnd
End a call
sipCallControl
Mute, hold and other in-call controls

Streams in and out

externalMediaIngest
Bring an outside stream into a room (WHIP)
externalMediaPlayback
Start and stop HLS and WHEP playback of a room

AI notes and logs (only when listed)

roomNotesRead
Read the finished AI note of one room you name (GET /v1/rooms/notes). Your rooms only; no transcript
aiFlowLogsRead
Read the AI flow log of one room you name (GET /v1/ai-flow/logs)
3Any time

List, update and revoke

Look 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.

Revoked and expired keys stay off. To restore access, create a new key and send it over.
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"
The list comes back as disposableKeys, with usage counts. Add activeOnly=false to include revoked and expired keys.
Limits

What each plan allows

Compare plans
PlanActive keysRequests per minute, per keyDomains per production key
Basic1301
Standard3904
Advanced1030010
Troubleshooting

When a disposable key is refused

"Disposable key has expired" or "inactive"

The key passed its validityDays or was revoked. Create a new one; a key can't be renewed.

"Domain not allowed for this disposable key"

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.

"Rate limit exceeded"

Each key has its own per-minute budget (see the table above). The error says when the window resets.

"Maximum active disposable keys reached"

Your plan's active-key limit is used up. Revoke a key you no longer need, or move to a larger plan.

"This key cannot create that type of room"

The key has room limits that name other event types. Use one of those types, or create a key whose limits include this one.

The request works with my main key but not the disposable 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.

Next

Keep your main key on your server

Disposable keys are for other people's code. Your own app should create rooms from your backend.