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

# Overview

> Relay is a single WebSocket connection your browser or mobile app uses to place and control calls with Call Fabric and WebRTC.

SignalWire Relay gives your browser or mobile app one persistent WebSocket connection to SignalWire. Over that single connection you place and control voice and video calls, manage the participant who is signed in, and react to real-time call and room events the moment they happen.

Relay keeps the connection open, so SignalWire can push events straight to you — a call was answered, a member joined the room, the layout changed — without you polling for them. You open the connection once, authenticate, then send commands and receive events over the same socket for as long as it stays open.

> **Note**
>
> This is the **Client** reference, for browser and mobile apps that authenticate with a short-lived token. Building a backend integration instead? See the [Server reference](/docs/apis/relay/server) for the `calling`, `messaging`, `tasking`, and `provisioning` surface.

## How a connection works

Every Relay session follows the same shape:

1. **Open the WebSocket** to `wss://relay.signalwire.com`.
2. **Authenticate** by sending `signalwire.connect` as your very first message. A WebSocket has no `Authorization` header, so your credential — a short-lived `jwt_token` your backend generates — travels in that first message instead. See [Authentication](/docs/apis/relay/client/authentication).
3. **Send commands and receive events** over the connection — place a call, control your audio and video, and listen for the room and member events each service emits.

Every response carries a result you check for success or failure. See [Errors](/docs/apis/relay/client/errors).

#### [Authentication](/docs/apis/relay/client/authentication)

Open the socket, then log in with your first message using a short-lived token from your backend.

#### [Events and subscriptions](/docs/apis/relay/client/events)

React to server-pushed call, member, and room events, and subscribe to a room's event feed.

#### [Connection lifecycle](/docs/apis/relay/client/connection-lifecycle)

Keep the connection healthy, refresh your token, handle a server-initiated disconnect, and reconnect cleanly.

#### [Errors](/docs/apis/relay/client/errors)

Every response carries a `code` and a `message`. Learn how to tell success from failure and what the common codes mean.

## Services

Relay groups its commands and events into services. They all share the one connection you open with `signalwire.connect`.

#### Signalwire

The entry point. Authenticate, open the connection, and refresh your token when it nears expiry.

#### Call Fabric

Control calls and conference members addressed by resource: hang up, mute and unmute, raise or lower a hand, manage members, change the room layout, and register a subscriber's presence.

#### WebRTC

Carry the Verto signaling for browser-based (peer) calling — the offer/answer exchange that sets up media.

Browse the full command-and-event reference for each service in the API reference under this tab.

## Use Relay from an SDK

You can speak the Relay WebSocket protocol directly, but most client developers use the SignalWire Browser SDK, which wraps the connection, authentication, WebRTC signaling, and every command in idiomatic, type-safe methods — so you don't manage the socket or negotiate media yourself.

See the [Browser SDK](/docs/browser-sdk/v4/guides/overview) to build calling into a web app, or read on to work with the protocol directly.