> This page is for APIs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# webrtc.message

GET /

Send and receive Verto frames

Reference: https://signalwire.com/docs/apis/relay/client/webrtc/webrtc-message

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: webrtc.message
  version: subpackage_webrtcMessage.webrtc.message
  description: Send and receive Verto frames
channels:
  /:
    description: Send and receive Verto frames
    publish:
      operationId: subpackage_webrtcMessage.webrtc.message-publish
      summary: Server messages
      message:
        oneOf:
          - $ref: >-
              #/components/messages/subpackage_webrtcMessage.webrtc.message-server-0-onWebrtcMessageMessageEvent
          - $ref: >-
              #/components/messages/subpackage_webrtcMessage.webrtc.message-server-1-onWebrtcMessageResponse
    subscribe:
      operationId: subpackage_webrtcMessage.webrtc.message-subscribe
      summary: webrtc.message
      message:
        name: webrtcMessage
        title: webrtc.message
        payload:
          $ref: '#/components/schemas/webrtc.message_webrtcMessageRequest'
servers:
  production:
    url: wss://relay.signalwire.com/
    protocol: wss
    x-default: true
components:
  messages:
    subpackage_webrtcMessage.webrtc.message-server-0-onWebrtcMessageMessageEvent:
      name: onWebrtcMessageMessageEvent
      title: webrtc.message
      payload:
        $ref: '#/components/schemas/webrtc.message_messageEvent'
    subpackage_webrtcMessage.webrtc.message-server-1-onWebrtcMessageResponse:
      name: onWebrtcMessageResponse
      title: webrtc.message response
      payload:
        $ref: '#/components/schemas/webrtc.message_webrtcMessageResponse'
  schemas:
    ChannelsWebrtcMessageMessagesMessageEventJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsWebrtcMessageMessagesMessageEventJsonrpc
    ChannelsWebrtcMessageMessagesMessageEventMethod:
      type: string
      enum:
        - signalwire.event
      description: Always `signalwire.event`.
      title: ChannelsWebrtcMessageMessagesMessageEventMethod
    ChannelsWebrtcMessageMessagesMessageEventParamsEventType:
      type: string
      enum:
        - webrtc.message
      description: The event type — identifies which event this is.
      title: ChannelsWebrtcMessageMessagesMessageEventParamsEventType
    ChannelsWebrtcMessageMessagesMessageEventParams:
      type: object
      properties:
        event_type:
          $ref: >-
            #/components/schemas/ChannelsWebrtcMessageMessagesMessageEventParamsEventType
          description: The event type — identifies which event this is.
        node_id:
          type: string
          description: >-
            The node that sent this event. Capture it once your call starts and
            reuse

            it as the `node_id` on your subsequent `message` requests so they
            reach the

            same node.
        event_channel:
          type: string
          description: >-
            The channel the event was delivered on — the session identifier this
            WebRTC connection is bound to.
        timestamp:
          type: number
          format: double
          description: When the event was emitted, as a Unix timestamp in seconds.
        project_id:
          type: string
          description: Your project ID.
        params:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            The event-specific payload for this WebRTC signaling event — either
            a signaling

            response or a conference/room event.
      required:
        - event_type
        - node_id
        - event_channel
        - timestamp
        - project_id
        - params
      description: The event envelope.
      title: ChannelsWebrtcMessageMessagesMessageEventParams
    webrtc.message_messageEvent:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsWebrtcMessageMessagesMessageEventJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: >-
            Event id — a unique UUID generated for each event. Events are
            notifications: you do not reply to them.
        method:
          $ref: '#/components/schemas/ChannelsWebrtcMessageMessagesMessageEventMethod'
          description: Always `signalwire.event`.
        params:
          $ref: '#/components/schemas/ChannelsWebrtcMessageMessagesMessageEventParams'
          description: The event envelope.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        Delivers a Verto frame from SignalWire to your client. This fires when
        SignalWire

        has a Verto response to one of your `webrtc.verto` frames, but also when

        SignalWire initiates signaling on its own — an incoming `verto.invite`,
        a

        `verto.bye` when the far end hangs up, `verto.media`/`verto.display`
        updates — so

        it can arrive without you sending anything.


        The Verto frame arrives at `params.params`, passed through as-is (the
        surrounding

        `params` object is the event envelope: `node_id`, `event_channel`,
        timestamps).

        Only these Verto methods are delivered: `verto.invite`, `verto.answer`,

        `verto.attach`, `verto.bye`, `verto.media`, `verto.mediaParams`,
        `verto.display`,

        and `verto.ping`. Conference and room events arrive as their own event
        types,

        such as `member.joined` and `room.updated`, never inside
        `webrtc.message`.
      title: webrtc.message_messageEvent
    ChannelsWebrtcMessageMessagesWebrtcMessageResponseJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsWebrtcMessageMessagesWebrtcMessageResponseJsonrpc
    WebRTC.WebRTCMessageResult:
      type: object
      properties:
        code:
          type: string
          description: >-
            Result code as a string. `"200"` means success. `"400"` means a
            non-invite frame

            was sent without a `node_id`. Other failures carry a lowercase error
            identifier

            such as `not_allowed`, `invalid_params`, `internal_error`, or
            `response_timeout`.
        result:
          type: object
          additionalProperties:
            description: Any type
          description: The Verto reply payload. The shape depends on the Verto method.
        message:
          type: string
          description: A human-readable status message. Present on errors.
        node_id:
          type: string
          description: >-
            The node hosting the call. Capture it and send it on later frames
            for this call.
      required:
        - code
      description: >-
        The reply to a `webrtc.message` request: the Verto outcome plus the node
        hosting the call.
      title: WebRTC.WebRTCMessageResult
    JsonRpcErrorCode0:
      type: string
      enum:
        - '-32000'
      title: JsonRpcErrorCode0
    JsonRpcErrorCode1:
      type: string
      enum:
        - '-32001'
      title: JsonRpcErrorCode1
    JsonRpcErrorCode2:
      type: string
      enum:
        - '-32002'
      title: JsonRpcErrorCode2
    JsonRpcErrorCode3:
      type: string
      enum:
        - '-32003'
      title: JsonRpcErrorCode3
    JsonRpcErrorCode4:
      type: string
      enum:
        - '-32004'
      title: JsonRpcErrorCode4
    JsonRpcErrorCode5:
      type: string
      enum:
        - '-32005'
      title: JsonRpcErrorCode5
    JsonRpcErrorCode6:
      type: string
      enum:
        - '-32600'
      title: JsonRpcErrorCode6
    JsonRpcErrorCode7:
      type: string
      enum:
        - '-32601'
      title: JsonRpcErrorCode7
    JsonRpcErrorCode8:
      type: string
      enum:
        - '-32602'
      title: JsonRpcErrorCode8
    JsonRpcErrorCode9:
      type: string
      enum:
        - '-32603'
      title: JsonRpcErrorCode9
    JsonRpcErrorCode10:
      type: string
      enum:
        - '-32700'
      title: JsonRpcErrorCode10
    JsonRpcErrorCode:
      oneOf:
        - $ref: '#/components/schemas/JsonRpcErrorCode0'
        - $ref: '#/components/schemas/JsonRpcErrorCode1'
        - $ref: '#/components/schemas/JsonRpcErrorCode2'
        - $ref: '#/components/schemas/JsonRpcErrorCode3'
        - $ref: '#/components/schemas/JsonRpcErrorCode4'
        - $ref: '#/components/schemas/JsonRpcErrorCode5'
        - $ref: '#/components/schemas/JsonRpcErrorCode6'
        - $ref: '#/components/schemas/JsonRpcErrorCode7'
        - $ref: '#/components/schemas/JsonRpcErrorCode8'
        - $ref: '#/components/schemas/JsonRpcErrorCode9'
        - $ref: '#/components/schemas/JsonRpcErrorCode10'
      title: JsonRpcErrorCode
    JsonRpcError:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/JsonRpcErrorCode'
          description: >-
            The error code — a negative integer identifying the failure. See
            `JsonRpcErrorCode` for the full list of values and meanings.
        message:
          type: string
          description: A human-readable description of what went wrong.
        original_request:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            An echo of the request that failed — the full JSON-RPC frame you
            sent

            (`jsonrpc`, `id`, `method`, `params`). Always present.
        requester_nodeid:
          type: string
          description: >-
            The node that sent the failed request. Present only on some routing
            errors.
        requester_identity:
          type: string
          description: >-
            The identity of the requester. Present only on some routing errors;
            same value as `requester_nodeid`.
        responder_nodeid:
          type: string
          description: >-
            The node that was handling the request. Present only on some routing
            errors.
        responder_identity:
          type: string
          description: >-
            The identity of the responder. Present only on some routing errors;
            same value as `responder_nodeid`.
        last_hop_timeout:
          type: boolean
          description: >-
            `true` when the request timed out on its final hop inside
            SignalWire. Present only on some timeout errors.
      required:
        - code
        - message
        - original_request
      description: >-
        A JSON-RPC 2.0 error object, delivered on the `error` field of a
        `JsonRpcResponse` when

        a request fails at the protocol level (bad version, authentication,
        scope, params, or

        your project's connection limit). It replaces `result` — a frame carries
        one or the other, never both.
      title: JsonRpcError
    webrtc.message_webrtcMessageResponse:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsWebrtcMessageMessagesWebrtcMessageResponseJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: The id of the request this responds to.
        result:
          $ref: '#/components/schemas/WebRTC.WebRTCMessageResult'
          description: The method result. Present when the request succeeded.
        error:
          $ref: '#/components/schemas/JsonRpcError'
          description: >-
            Present instead of `result` when the request failed at the protocol
            level.
      required:
        - jsonrpc
        - id
      description: >-
        A JSON-RPC response frame correlated to a request by `id`. On success
        the frame carries

        `result` (the method result). If the request fails at the protocol level
        — an

        incompatible version, failed authentication, insufficient scope, invalid
        params, or your

        project's connection limit — the frame carries `error` instead of
        `result`. Many

        method-level failures (for example most Calling failures) are reported
        the other way: a

        normal `result` whose own `code` is not `"200"`. Each method documents
        which form its

        failures take.


        An `error` returned for `signalwire.connect` is followed by the service
        closing the

        WebSocket; open a new connection to try again. The same happens when

        `signalwire.reauthenticate` sends credentials that are rejected, except
        for a

        Subscriber Access Token. Errors on any other request leave the
        connection open.
      title: webrtc.message_webrtcMessageResponse
    ChannelsWebrtcMessageMessagesWebrtcMessageRequestJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsWebrtcMessageMessagesWebrtcMessageRequestJsonrpc
    ChannelsWebrtcMessageMessagesWebrtcMessageRequestMethod:
      type: string
      enum:
        - webrtc.message
      description: The name of the JSON-RPC method being invoked.
      title: ChannelsWebrtcMessageMessagesWebrtcMessageRequestMethod
    WebRTC.WebRTCMessageParams:
      type: object
      properties:
        message:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            The Verto frame to send — a JSON-RPC 2.0 object `{ jsonrpc, id,
            method, params }`,

            passed through as-is. See `webrtc.verto` for the frame format.
        node_id:
          type: string
          description: >-
            The node hosting the call. Omit it on a `verto.invite`; required on
            every other

            frame — use the `node_id` from the invite's reply or a later event.
      required:
        - message
      description: >-
        The parameters for a `webrtc.message` request: the Verto frame to send
        and the `node_id` hosting the call.
      title: WebRTC.WebRTCMessageParams
    webrtc.message_webrtcMessageRequest:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsWebrtcMessageMessagesWebrtcMessageRequestJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: Request id, echoed on the correlated response.
        method:
          $ref: >-
            #/components/schemas/ChannelsWebrtcMessageMessagesWebrtcMessageRequestMethod
          description: The name of the JSON-RPC method being invoked.
        params:
          $ref: '#/components/schemas/WebRTC.WebRTCMessageParams'
          description: The method's input parameters.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        A JSON-RPC request frame. `Method` is the method name; `Params` is the
        method's input.
      title: webrtc.message_webrtcMessageRequest

```