RelayrtcDocs
Get started
Documentation
REST API v1

Authentication

Authorize REST requests with a scoped API key.

On this page

Bearer token

Shell
curl "$RELAYRTC_API_URL/rooms" \
  -H "Authorization: Bearer $RELAYRTC_SECRET_KEY"

Get a secret key from your project's API keys page. The key belongs to one environment. A publishable key can read its API context but cannot call management endpoints.

Scopes

ScopeEndpoints
rooms:createCreate rooms.
rooms:readList/read rooms and inspect their cleanup operation.
rooms:endEnd rooms.
tokens:createIssue and renew participant tokens; issue TURN credentials.
participants:readList/read participants and inspect cleanup.
participants:removeRemove a participant.
usage:readRead environment usage and project usage reports.
analytics:readRead project analytics.
webhooks:readRead webhook endpoints, delivery logs and signing contract.
webhooks:writeCreate/update/remove endpoints, rotate secrets and replay deliveries.
streams:readRead streams, broadcasts, destinations and related streaming status.
streams:writeConfigure streams and manage broadcasts, schedules and related resources.
streams:publishStart room sources, issue ingest credentials and authorize publishing operations.
streams:playbackIssue and revoke live, scheduled and DVR playback grants.
recordings:readRead recordings, clips and assets; issue authorized asset access grants.
recordings:createStart and manage recordings, clips, buffer policies and asset revocation.

Participant token permissions are separate from API key scopes. See keys and permissions.

Some streaming commands require more than one scope. For example, starting an automatically recorded broadcast also requires recordings:create. Check the resource reference for the complete requirements. Streaming routes require an enabled streaming deployment and matching API/SDK versions.

Project and environment

Paths and optional scope query parameters cannot override the key's project or environment. Depending on the route, a mismatch returns 403 or an inaccessible resource is hidden with 404.

Optional x-relayrtc-project-id and x-relayrtc-environment-id headers are assertions of scope. If supplied, they must match the key; mismatched assertions return 403.

Console routes

Organization reporting requires a console session and organization membership, not a project API key. Project webhook aliases can accept a console session; session-authenticated writes require a trusted console Origin header.