Overview
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.
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 for the calling, messaging, tasking, and provisioning surface.
How a connection works
Every Relay session follows the same shape:
- Open the WebSocket to
wss://relay.signalwire.com. - Authenticate by sending
signalwire.connectas your very first message. A WebSocket has noAuthorizationheader, so your credential — a short-livedjwt_tokenyour backend generates — travels in that first message instead. See Authentication. - 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.
Services
Relay groups its commands and events into services. They all share the one connection you open with signalwire.connect.
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 to build calling into a web app, or read on to work with the protocol directly.