LiveKit · AsyncAPI Specification

LiveKit Signaling Protocol

Version 1.0.0

AsyncAPI description of LiveKit's signaling WebSocket protocol. LiveKit clients connect to a LiveKit server (Cloud or self-hosted) over a WebSocket at the `/rtc` endpoint. Once connected, the client and server exchange Protocol Buffer encoded messages. By convention the client sends a `SignalRequest` and the server replies with a `SignalResponse`; both sides can send messages asynchronously at any time. Source of truth: `livekit/protocol` repository (`livekit_rtc.proto` and `livekit_models.proto`) and the public docs at https://docs.livekit.io/reference/internals/client-protocol/. All message schemas mirror the on-the-wire protobuf definitions; field numbers from the `.proto` files are preserved in `x-proto-field` extensions where useful for cross-referencing.

View Spec View on GitHub RealtimeWebRTCAudioVideoOpen SourceAI AgentsVoiceCloudAsyncAPIWebhooksEvents

Channels

/rtc
publish sendSignalRequest
Client-to-server signal messages (SignalRequest oneof variants).
Bi-directional signaling channel. The client publishes `SignalRequest` envelopes; the server publishes `SignalResponse` envelopes. Each envelope is a `oneof` carrying exactly one of the signal variants defined in `livekit_rtc.proto`.

Messages

OfferRequest
Offer (publisher)
Client sends an SDP offer to the publisher peer connection.
AnswerRequest
Answer (subscriber)
Client SDP answer in response to a server-sent subscriber offer.
TrickleRequest
Trickle ICE
ICE candidate exchanged in either direction.
AddTrack
Add Track
Request to publish a new track.
MuteTrack
Mute Track (client)
Mute or unmute a published track.
UpdateSubscription
Update Subscription
Subscribe to or unsubscribe from one or more tracks.
UpdateTrackSettings
Update Track Settings
Adjust quality/dimensions/fps of subscribed tracks.
Leave
Leave (client)
Client requests session termination.
UpdateLayers
Update Video Layers (deprecated)
Update published video track dimensions (deprecated).
UpdateSubscriptionPermission
Update Subscription Permissions
Update which participants can subscribe to which of this participant's tracks.
SyncState
Sync State
Synchronize subscription / publish state when resuming a session.
Simulate
Simulate Scenario
Trigger a client validation scenario on the server.
PingLegacy
Ping (deprecated)
Legacy client keep-alive ping (int64 timestamp, deprecated by ping_req).
UpdateMetadata
Update Participant Metadata
Update local participant metadata, name, or attributes.
Ping
Ping
Client keep-alive ping (current, supersedes legacy int64 ping).
UpdateLocalAudioTrack
Update Local Audio Track
Update audio feature flags (DTX, RED, stereo, etc.) on a published audio track.
UpdateLocalVideoTrack
Update Local Video Track
Update dimensions for a published video track.
PublishDataTrack
Publish Data Track
Publish a new data track.
UnpublishDataTrack
Unpublish Data Track
Remove a previously published data track.
UpdateDataSubscription
Update Data Track Subscription
Subscribe or unsubscribe from data tracks.
Join
Join Response
Server confirms the client has joined the room.
AnswerResponse
Answer (publisher response)
Server SDP answer to the publisher offer.
OfferResponse
Offer (subscriber)
Server SDP offer for the subscriber peer connection.
TrickleResponse
Trickle ICE (server)
Server-sent ICE candidate.
Update
Participant Update
Notification of remote participants joining, leaving, or changing.
TrackPublished
Track Published
Confirms a track publication and returns the assigned track info.
LeaveResponse
Leave (server)
Server instructs the client to disconnect, resume, or reconnect.
MuteResponse
Mute Track (server)
Server-initiated mute/unmute notification.
SpeakersChanged
Speakers Changed
Delta list of active speakers.
RoomUpdate
Room Update
Room metadata change.
ConnectionQuality
Connection Quality Update
Connection quality updates for one or more participants.
StreamStateUpdate
Stream State Update
Track-level stream state (active or paused) updates.
SubscribedQualityUpdate
Subscribed Quality Update
Updates the set of enabled video qualities for a subscribed track.
SubscriptionPermissionUpdate
Subscription Permission Update
Notification that a participant's subscription permission to a track has changed.
RefreshToken
Refresh Token
Server-issued replacement access token before the current token expires.
TrackUnpublished
Track Unpublished
A previously published track has been unpublished.
PongLegacy
Pong (deprecated)
Legacy server pong (int64 timestamp, deprecated by pong_resp).
Reconnect
Reconnect Response
Sent during a successful WebSocket resume with updated ICE servers and config.
Pong
Pong
Server response to client `Ping` (current).
SubscriptionResponse
Subscription Response
Result of a subscription operation (success or error).
RequestResponse
Request Response
Server response to a request identified by `request_id` (mute, add_track, etc.).
TrackSubscribed
Track Subscribed
Notification that a subscribed track is now ready for media.
RoomMoved
Room Moved
The participant has been migrated to a different room/server.
MediaSectionsRequirement
Media Sections Requirement
Required number of audio and video media sections for the publisher.
SubscribedAudioCodecUpdate
Subscribed Audio Codec Update
Updates the audio codec subscription preferences for a track.
PublishDataTrackResponse
Publish Data Track Response
Server response after publishing a data track.
UnpublishDataTrackResponse
Unpublish Data Track Response
Server response after unpublishing a data track.
DataTrackSubscriberHandles
Data Track Subscriber Handles
Mapping from incoming packet handles to subscribed data track SIDs.

Servers

wss
production wss://{host}/rtc
LiveKit signaling WebSocket endpoint. `host` is the LiveKit server host (Cloud project URL or self-hosted deployment). Protocol Buffers are sent over the WebSocket as binary frames; some clients negotiate JSON-encoded protobuf for text frames.

AsyncAPI Specification

Raw ↑
asyncapi: '2.6.0'
info:
  title: LiveKit Signaling Protocol
  version: '1.0.0'
  description: |
    AsyncAPI description of LiveKit's signaling WebSocket protocol.

    LiveKit clients connect to a LiveKit server (Cloud or self-hosted) over a
    WebSocket at the `/rtc` endpoint. Once connected, the client and server
    exchange Protocol Buffer encoded messages. By convention the client sends a
    `SignalRequest` and the server replies with a `SignalResponse`; both sides
    can send messages asynchronously at any time.

    Source of truth: `livekit/protocol` repository (`livekit_rtc.proto` and
    `livekit_models.proto`) and the public docs at
    https://docs.livekit.io/reference/internals/client-protocol/.

    All message schemas mirror the on-the-wire protobuf definitions; field
    numbers from the `.proto` files are preserved in `x-proto-field` extensions
    where useful for cross-referencing.
  contact:
    name: API Evangelist
    url: https://apievangelist.com
    email: [email protected]
  license:
    name: Apache-2.0
    url: https://github.com/livekit/protocol/blob/main/LICENSE
  x-source:
    - https://docs.livekit.io/reference/internals/client-protocol/
    - https://github.com/livekit/protocol/blob/main/protobufs/livekit_rtc.proto
    - https://github.com/livekit/protocol/blob/main/protobufs/livekit_models.proto

defaultContentType: application/x-protobuf

servers:
  production:
    url: wss://{host}/rtc
    protocol: wss
    description: |
      LiveKit signaling WebSocket endpoint. `host` is the LiveKit server host
      (Cloud project URL or self-hosted deployment). Protocol Buffers are sent
      over the WebSocket as binary frames; some clients negotiate JSON-encoded
      protobuf for text frames.
    variables:
      host:
        default: your-project.livekit.cloud
        description: LiveKit server host (Cloud project URL or self-hosted host).
    bindings:
      ws:
        query:
          type: object
          description: Query parameters supplied on the initial `/rtc` WebSocket upgrade.
          properties:
            access_token:
              type: string
              description: Encoded JWT access token authorizing the participant for a room.
            reconnect:
              type: string
              description: When `1`, resume an existing connection; triggers an ICE restart on the server.
            auto_subscribe:
              type: string
              description: Default `true`. When `false`, the client must explicitly subscribe to tracks.
            sdk:
              type: string
              description: SDK type identifier (`js`, `ios`, `android`, `go`, `unity`, `flutter`, `rust`, `swift`, etc.).
            protocol:
              type: string
              description: Signal protocol version negotiated by the client (e.g. `15`).
            version:
              type: string
              description: Client SDK version string.
            adaptive_stream:
              type: string
              description: Whether the client supports adaptive streaming.
            participant_sid:
              type: string
              description: Participant SID used when resuming a session.
            network:
              type: string
              description: Optional network hint (e.g. `wifi`, `cellular`).
        bindingVersion: '0.1.0'

channels:
  /rtc:
    description: |
      Bi-directional signaling channel. The client publishes `SignalRequest`
      envelopes; the server publishes `SignalResponse` envelopes. Each envelope
      is a `oneof` carrying exactly one of the signal variants defined in
      `livekit_rtc.proto`.
    bindings:
      ws:
        method: GET
        bindingVersion: '0.1.0'
    publish:
      operationId: sendSignalRequest
      summary: Client-to-server signal messages (SignalRequest oneof variants).
      description: |
        Each message is a `SignalRequest` whose `message` oneof selects one of
        the documented variants below.
      message:
        oneOf:
          - $ref: '#/components/messages/OfferRequest'
          - $ref: '#/components/messages/AnswerRequest'
          - $ref: '#/components/messages/TrickleRequest'
          - $ref: '#/components/messages/AddTrack'
          - $ref: '#/components/messages/MuteTrack'
          - $ref: '#/components/messages/UpdateSubscription'
          - $ref: '#/components/messages/UpdateTrackSettings'
          - $ref: '#/components/messages/Leave'
          - $ref: '#/components/messages/UpdateLayers'
          - $ref: '#/components/messages/UpdateSubscriptionPermission'
          - $ref: '#/components/messages/SyncState'
          - $ref: '#/components/messages/Simulate'
          - $ref: '#/components/messages/PingLegacy'
          - $ref: '#/components/messages/UpdateMetadata'
          - $ref: '#/components/messages/Ping'
          - $ref: '#/components/messages/UpdateLocalAudioTrack'
          - $ref: '#/components/messages/UpdateLocalVideoTrack'
          - $ref: '#/components/messages/PublishDataTrack'
          - $ref: '#/components/messages/UnpublishDataTrack'
          - $ref: '#/components/messages/UpdateDataSubscription'
    subscribe:
      operationId: receiveSignalResponse
      summary: Server-to-client signal messages (SignalResponse oneof variants).
      description: |
        Each message is a `SignalResponse` whose `message` oneof selects one of
        the documented variants below.
      message:
        oneOf:
          - $ref: '#/components/messages/Join'
          - $ref: '#/components/messages/AnswerResponse'
          - $ref: '#/components/messages/OfferResponse'
          - $ref: '#/components/messages/TrickleResponse'
          - $ref: '#/components/messages/Update'
          - $ref: '#/components/messages/TrackPublished'
          - $ref: '#/components/messages/LeaveResponse'
          - $ref: '#/components/messages/MuteResponse'
          - $ref: '#/components/messages/SpeakersChanged'
          - $ref: '#/components/messages/RoomUpdate'
          - $ref: '#/components/messages/ConnectionQuality'
          - $ref: '#/components/messages/StreamStateUpdate'
          - $ref: '#/components/messages/SubscribedQualityUpdate'
          - $ref: '#/components/messages/SubscriptionPermissionUpdate'
          - $ref: '#/components/messages/RefreshToken'
          - $ref: '#/components/messages/TrackUnpublished'
          - $ref: '#/components/messages/PongLegacy'
          - $ref: '#/components/messages/Reconnect'
          - $ref: '#/components/messages/Pong'
          - $ref: '#/components/messages/SubscriptionResponse'
          - $ref: '#/components/messages/RequestResponse'
          - $ref: '#/components/messages/TrackSubscribed'
          - $ref: '#/components/messages/RoomMoved'
          - $ref: '#/components/messages/MediaSectionsRequirement'
          - $ref: '#/components/messages/SubscribedAudioCodecUpdate'
          - $ref: '#/components/messages/PublishDataTrackResponse'
          - $ref: '#/components/messages/UnpublishDataTrackResponse'
          - $ref: '#/components/messages/DataTrackSubscriberHandles'

components:
  messages:
    # ---------- Client to Server (SignalRequest variants) ----------
    OfferRequest:
      name: offer
      title: Offer (publisher)
      summary: Client sends an SDP offer to the publisher peer connection.
      description: Maps to `SignalRequest.offer` (proto field 1).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SessionDescription'

    AnswerRequest:
      name: answer
      title: Answer (subscriber)
      summary: Client SDP answer in response to a server-sent subscriber offer.
      description: Maps to `SignalRequest.answer` (proto field 2).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SessionDescription'

    TrickleRequest:
      name: trickle
      title: Trickle ICE
      summary: ICE candidate exchanged in either direction.
      description: Maps to `SignalRequest.trickle` (proto field 3) and `SignalResponse.trickle` (proto field 4).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/TrickleRequest'

    AddTrack:
      name: add_track
      title: Add Track
      summary: Request to publish a new track.
      description: Maps to `SignalRequest.add_track` (proto field 4).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/AddTrackRequest'

    MuteTrack:
      name: mute
      title: Mute Track (client)
      summary: Mute or unmute a published track.
      description: Maps to `SignalRequest.mute` (proto field 5).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/MuteTrackRequest'

    UpdateSubscription:
      name: subscription
      title: Update Subscription
      summary: Subscribe to or unsubscribe from one or more tracks.
      description: Maps to `SignalRequest.subscription` (proto field 6).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UpdateSubscription'

    UpdateTrackSettings:
      name: track_setting
      title: Update Track Settings
      summary: Adjust quality/dimensions/fps of subscribed tracks.
      description: Maps to `SignalRequest.track_setting` (proto field 7).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UpdateTrackSettings'

    Leave:
      name: leave
      title: Leave (client)
      summary: Client requests session termination.
      description: Maps to `SignalRequest.leave` (proto field 8).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/LeaveRequest'

    UpdateLayers:
      name: update_layers
      title: Update Video Layers (deprecated)
      summary: Update published video track dimensions (deprecated).
      description: Maps to `SignalRequest.update_layers` (proto field 10, deprecated).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UpdateVideoLayers'

    UpdateSubscriptionPermission:
      name: subscription_permission
      title: Update Subscription Permissions
      summary: Update which participants can subscribe to which of this participant's tracks.
      description: Maps to `SignalRequest.subscription_permission` (proto field 11).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SubscriptionPermission'

    SyncState:
      name: sync_state
      title: Sync State
      summary: Synchronize subscription / publish state when resuming a session.
      description: Maps to `SignalRequest.sync_state` (proto field 12).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SyncState'

    Simulate:
      name: simulate
      title: Simulate Scenario
      summary: Trigger a client validation scenario on the server.
      description: Maps to `SignalRequest.simulate` (proto field 13).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SimulateScenario'

    PingLegacy:
      name: ping
      title: Ping (deprecated)
      summary: Legacy client keep-alive ping (int64 timestamp, deprecated by ping_req).
      description: Maps to `SignalRequest.ping` (proto field 14, deprecated).
      contentType: application/x-protobuf
      payload:
        type: integer
        format: int64
        description: Client timestamp in milliseconds since epoch.

    UpdateMetadata:
      name: update_metadata
      title: Update Participant Metadata
      summary: Update local participant metadata, name, or attributes.
      description: Maps to `SignalRequest.update_metadata` (proto field 15).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UpdateParticipantMetadata'

    Ping:
      name: ping_req
      title: Ping
      summary: Client keep-alive ping (current, supersedes legacy int64 ping).
      description: Maps to `SignalRequest.ping_req` (proto field 16).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/Ping'

    UpdateLocalAudioTrack:
      name: update_audio_track
      title: Update Local Audio Track
      summary: Update audio feature flags (DTX, RED, stereo, etc.) on a published audio track.
      description: Maps to `SignalRequest.update_audio_track` (proto field 17).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UpdateLocalAudioTrack'

    UpdateLocalVideoTrack:
      name: update_video_track
      title: Update Local Video Track
      summary: Update dimensions for a published video track.
      description: Maps to `SignalRequest.update_video_track` (proto field 18).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UpdateLocalVideoTrack'

    PublishDataTrack:
      name: publish_data_track_request
      title: Publish Data Track
      summary: Publish a new data track.
      description: Maps to `SignalRequest.publish_data_track_request` (proto field 19).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/PublishDataTrackRequest'

    UnpublishDataTrack:
      name: unpublish_data_track_request
      title: Unpublish Data Track
      summary: Remove a previously published data track.
      description: Maps to `SignalRequest.unpublish_data_track_request` (proto field 20).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UnpublishDataTrackRequest'

    UpdateDataSubscription:
      name: update_data_subscription
      title: Update Data Track Subscription
      summary: Subscribe or unsubscribe from data tracks.
      description: Maps to `SignalRequest.update_data_subscription` (proto field 21).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UpdateDataSubscription'

    # ---------- Server to Client (SignalResponse variants) ----------
    Join:
      name: join
      title: Join Response
      summary: Server confirms the client has joined the room.
      description: Maps to `SignalResponse.join` (proto field 1).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/JoinResponse'

    AnswerResponse:
      name: answer
      title: Answer (publisher response)
      summary: Server SDP answer to the publisher offer.
      description: Maps to `SignalResponse.answer` (proto field 2).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SessionDescription'

    OfferResponse:
      name: offer
      title: Offer (subscriber)
      summary: Server SDP offer for the subscriber peer connection.
      description: Maps to `SignalResponse.offer` (proto field 3).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SessionDescription'

    TrickleResponse:
      name: trickle
      title: Trickle ICE (server)
      summary: Server-sent ICE candidate.
      description: Maps to `SignalResponse.trickle` (proto field 4).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/TrickleRequest'

    Update:
      name: update
      title: Participant Update
      summary: Notification of remote participants joining, leaving, or changing.
      description: Maps to `SignalResponse.update` (proto field 5).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/ParticipantUpdate'

    TrackPublished:
      name: track_published
      title: Track Published
      summary: Confirms a track publication and returns the assigned track info.
      description: Maps to `SignalResponse.track_published` (proto field 6).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/TrackPublishedResponse'

    LeaveResponse:
      name: leave
      title: Leave (server)
      summary: Server instructs the client to disconnect, resume, or reconnect.
      description: Maps to `SignalResponse.leave` (proto field 8).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/LeaveRequest'

    MuteResponse:
      name: mute
      title: Mute Track (server)
      summary: Server-initiated mute/unmute notification.
      description: Maps to `SignalResponse.mute` (proto field 9).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/MuteTrackRequest'

    SpeakersChanged:
      name: speakers_changed
      title: Speakers Changed
      summary: Delta list of active speakers.
      description: Maps to `SignalResponse.speakers_changed` (proto field 10).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SpeakersChanged'

    RoomUpdate:
      name: room_update
      title: Room Update
      summary: Room metadata change.
      description: Maps to `SignalResponse.room_update` (proto field 11).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/RoomUpdate'

    ConnectionQuality:
      name: connection_quality
      title: Connection Quality Update
      summary: Connection quality updates for one or more participants.
      description: Maps to `SignalResponse.connection_quality` (proto field 12).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/ConnectionQualityUpdate'

    StreamStateUpdate:
      name: stream_state_update
      title: Stream State Update
      summary: Track-level stream state (active or paused) updates.
      description: Maps to `SignalResponse.stream_state_update` (proto field 13).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/StreamStateUpdate'

    SubscribedQualityUpdate:
      name: subscribed_quality_update
      title: Subscribed Quality Update
      summary: Updates the set of enabled video qualities for a subscribed track.
      description: Maps to `SignalResponse.subscribed_quality_update` (proto field 14).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SubscribedQualityUpdate'

    SubscriptionPermissionUpdate:
      name: subscription_permission_update
      title: Subscription Permission Update
      summary: Notification that a participant's subscription permission to a track has changed.
      description: Maps to `SignalResponse.subscription_permission_update` (proto field 15).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SubscriptionPermissionUpdate'

    RefreshToken:
      name: refresh_token
      title: Refresh Token
      summary: Server-issued replacement access token before the current token expires.
      description: Maps to `SignalResponse.refresh_token` (proto field 16).
      contentType: application/x-protobuf
      payload:
        type: string
        description: New JWT access token.

    TrackUnpublished:
      name: track_unpublished
      title: Track Unpublished
      summary: A previously published track has been unpublished.
      description: Maps to `SignalResponse.track_unpublished` (proto field 17).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/TrackUnpublishedResponse'

    PongLegacy:
      name: pong
      title: Pong (deprecated)
      summary: Legacy server pong (int64 timestamp, deprecated by pong_resp).
      description: Maps to `SignalResponse.pong` (proto field 18, deprecated).
      contentType: application/x-protobuf
      payload:
        type: integer
        format: int64
        description: Echoed client timestamp in milliseconds since epoch.

    Reconnect:
      name: reconnect
      title: Reconnect Response
      summary: Sent during a successful WebSocket resume with updated ICE servers and config.
      description: Maps to `SignalResponse.reconnect` (proto field 19).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/ReconnectResponse'

    Pong:
      name: pong_resp
      title: Pong
      summary: Server response to client `Ping` (current).
      description: Maps to `SignalResponse.pong_resp` (proto field 20).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/Pong'

    SubscriptionResponse:
      name: subscription_response
      title: Subscription Response
      summary: Result of a subscription operation (success or error).
      description: Maps to `SignalResponse.subscription_response` (proto field 21).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SubscriptionResponse'

    RequestResponse:
      name: request_response
      title: Request Response
      summary: Server response to a request identified by `request_id` (mute, add_track, etc.).
      description: Maps to `SignalResponse.request_response` (proto field 22).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/RequestResponse'

    TrackSubscribed:
      name: track_subscribed
      title: Track Subscribed
      summary: Notification that a subscribed track is now ready for media.
      description: Maps to `SignalResponse.track_subscribed` (proto field 23).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/TrackSubscribed'

    RoomMoved:
      name: room_moved
      title: Room Moved
      summary: The participant has been migrated to a different room/server.
      description: Maps to `SignalResponse.room_moved` (proto field 24).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/RoomMovedResponse'

    MediaSectionsRequirement:
      name: media_sections_requirement
      title: Media Sections Requirement
      summary: Required number of audio and video media sections for the publisher.
      description: Maps to `SignalResponse.media_sections_requirement` (proto field 25).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/MediaSectionsRequirement'

    SubscribedAudioCodecUpdate:
      name: subscribed_audio_codec_update
      title: Subscribed Audio Codec Update
      summary: Updates the audio codec subscription preferences for a track.
      description: Maps to `SignalResponse.subscribed_audio_codec_update` (proto field 26).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/SubscribedAudioCodecUpdate'

    PublishDataTrackResponse:
      name: publish_data_track_response
      title: Publish Data Track Response
      summary: Server response after publishing a data track.
      description: Maps to `SignalResponse.publish_data_track_response` (proto field 27).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/PublishDataTrackResponse'

    UnpublishDataTrackResponse:
      name: unpublish_data_track_response
      title: Unpublish Data Track Response
      summary: Server response after unpublishing a data track.
      description: Maps to `SignalResponse.unpublish_data_track_response` (proto field 28).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/UnpublishDataTrackResponse'

    DataTrackSubscriberHandles:
      name: data_track_subscriber_handles
      title: Data Track Subscriber Handles
      summary: Mapping from incoming packet handles to subscribed data track SIDs.
      description: Maps to `SignalResponse.data_track_subscriber_handles` (proto field 29).
      contentType: application/x-protobuf
      payload:
        $ref: '#/components/schemas/DataTrackSubscriberHandles'

  schemas:
    # ----- Core SDP and ICE -----
    SessionDescription:
      type: object
      description: WebRTC session description (SDP).
      properties:
        type:
          type: string
          description: SDP type. One of `answer`, `offer`, `pranswer`, `rollback`.
          enum: [answer, offer, pranswer, rollback]
          x-proto-field: 1
        sdp:
          type: string
          description: SDP body.
          x-proto-field: 2
        id:
          type: integer
          format: uint32
          description: Optional ordering identifier used to correlate offer/answer pairs.
          x-proto-field: 3
        midToTrackId:
          type: object
          description: Map from SDP `mid` to LiveKit track SID.
          additionalProperties:
            type: string
          x-proto-field: 4

    TrickleRequest:
      type: object
      description: A trickled ICE candidate destined for one of the peer connections.
      properties:
        candidateInit:
          type: string
          description: JSON-serialized RTCIceCandidateInit.
          x-proto-field: 1
        target:
          $ref: '#/components/schemas/SignalTarget'
          x-proto-field: 2
        final:
          type: boolean
          description: True for the end-of-candidates signal.
          x-proto-field: 3

    SignalTarget:
      type: string
      description: Identifies which peer connection a signal is targeted at.
      enum:
        - PUBLISHER
        - SUBSCRIBER

    # ----- Track publish / mute -----
    SimulcastCodec:
      type: object
      description: Codec configuration for a simulcast track.
      properties:
        codec:
          type: string
          x-proto-field: 1
        cid:
          type: string
          description: Client-assigned track id for this codec layer.
          x-proto-field: 2
        layers:
          type: array
          items:
            $ref: '#/components/schemas/VideoLayer'
          x-proto-field: 4
        videoLayerMode:
          $ref: '#/components/schemas/VideoLayerMode'
          x-proto-field: 5

    VideoLayerMode:
      type: string
      enum: [UNSPECIFIED, SVC, SIMULCAST]
      description: VideoLayer.Mode from livekit_models.proto.

    AddTrackRequest:
      type: object
      description: Request to publish a track.
      properties:
        cid:
          type: string
          description: Client-assigned track id used to match the RTC media track.
          x-proto-field: 1
        name:
          type: string
          x-proto-field: 2
        type:
          $ref: '#/components/schemas/TrackType'
          x-proto-field: 3
        width:
          type: integer
          format: uint32
          x-proto-field: 4
        height:
          type: integer
          format: uint32
          x-proto-field: 5
        muted:
          type: boolean
          x-proto-field: 6
        disableDtx:
          type: boolean
          description: Deprecated; use `audioFeatures`.
          x-proto-field: 7
          deprecated: true
        source:
          $ref: '#/components/schemas/TrackSource'
          x-proto-field: 8
        layers:
          type: array
          items:
            $ref: '#/components/schemas/VideoLayer'
          x-proto-field: 9
        simulcastCodecs:
          type: array
          items:
            $ref: '#/components/schemas/SimulcastCodec'
          x-proto-field: 10
        sid:
          type: string
          description: Server-assigned track SID when adding a codec to an existing track.
          x-proto-field: 11
        stereo:
          type: boolean
          deprecated: true
          x-proto-field: 12
        disableRed:
          type: boolean
          x-proto-field: 13
        encryption:
          $ref: '#/components/schemas/EncryptionType'
          x-proto-field: 14
        stream:
          type: string
          description: Logical stream grouping for the track.
          x-proto-field: 15
        backupCodecPolicy:
          $ref: '#/components/schemas/BackupCodecPolicy'
          x-proto-field: 16
        audioFeatures:
          type: array
          items:
            $ref: '#/components/schemas/AudioTrackFeature'
          x-proto-field: 17
        packetTrailerFeatures:
          type: array
          items:
            $ref: '#/components/schemas/PacketTrailerFeature'
          x-proto-field: 18

    MuteTrackRequest:
      type: object
      properties:
        sid:
          type: string
          x-proto-field: 1
        muted:
          type: boolean
          x-proto-field: 2

    # ----- Subscription management -----
    UpdateSubscription:
      type: object
      properties:
        trackSids:
          type: array
          items:
            type: string
          x-proto-field: 1
        subscribe:
          type: boolean
          x-proto-field: 2
        participantTracks:
          type: array
          items:
            $ref: '#/components/schemas/ParticipantTracks'
          x-proto-field: 3

    ParticipantTracks:
      type: object
      properties:
        participantSid:
          type: string
        trackSids:
          type: array
          items:
            type: string

    UpdateTrackSettings:
      type: object
      properties:
        trackSids:
          type: array
          items:
            type: string
          x-proto-field: 1
        disabled:
          type: boolean
          x-proto-field: 3
        quality:
          $ref: '#/components/schemas/VideoQuality'
          deprecated: true
          x-proto-field: 4
        width:
          type: integer
          format: uint32
          x-proto-field: 5
        height:
          type: integer
          format: uint32
          x-proto-field: 6
        fps:
          type: integer
          format: uint32
          x-proto-field: 7
        priority:
          type: integer
          format: uint32
          description: Subscription priority. 1 is highest; 0 means unset.
          x-proto-field: 8

    UpdateLocalAudioTrack:
      type: object
      properties:
        trackSid:
          type: string
          x-proto-field: 1
        features:
          type: array
          items:
            $ref: '#/components/schemas/AudioTrackFeature'
          x-proto-field: 2

    UpdateLocalVideoTrack:
      type: object
      properties:
        trackSid:
          type: string
          x-proto-field: 1
        width:
          type: integer
          format: uint32
          x-proto-field: 2
        height:
          type: integer
          format: uint32
          x-proto-field: 3

    UpdateVideoLayers:
      type: object
      deprecated: true
      properties:
        trackSid:
          type: string
          x-proto-field: 1
        layers:
          type: array
          items:
            $ref: '#/components/schemas/VideoLayer'
          x-proto-field: 2

    UpdateParticipantMetadata:
      type: object
      properties:
        metadata:
          type: string
          x-proto-field: 1
        name:
          type: string
          x-proto-field: 2
        attributes:
          type: object
          additionalProperties:
            type: string
          x-proto-field: 3
        requestId:
          type: integer
          format: uint32
          x-proto-field: 4

    # ----- Data tracks -----
    PublishDataTrackRequest:
      type: object
      properties:
        pubHandle:
          type: integer
          format: uint32
          description: Client-assigned 16-bit identifier attached to packets sent by the publisher.
          x-proto-field: 1
        name:
          type: string
          description: Human-readable identifier, unique per publisher (<=256 chars).
          x-proto-field: 2
        encryption:
          $ref: '#/components/schemas/EncryptionType'
          x-proto-field: 3

    PublishDataTrackResponse:
      type: object
      properties:
        info:
          $ref: '#/components/schemas/DataTrackInfo'
          x-proto-field: 1

    UnpublishDataTrackRequest:
      type: object
      properties:
        pubHandle:
          type: integer
          format: uint32
          x-proto-field: 1

    UnpublishDataTrackResponse:
      type: object
      properties:
        info:
          $ref: '#/components/schemas/DataTrackInfo'
          x-proto-field: 1

    UpdateDataSubscription:
      type: object
      properties:
        updates:
          type: array
          items:
            $ref: '#/components/schemas/UpdateDataSubscriptionUpdate'
          x-proto-field: 1

    UpdateDataSubscriptionUpdate:
      type: object
      description: Single entry in `UpdateDataSubscription.updates`.
      properties:
        trackSid:
          type: string
          x-proto-field: 1
        subscribe:
          type: boolean
          x-proto-fie

# --- truncated at 32 KB (53 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/livekit/refs/heads/main/asyncapi/livekit-asyncapi.yml