Documentation
Sign inGet started

Sending events to a member

Send personal events, such as order updates, shared-document notifications, or balance changes, directly to a member. You do not need to create a channel for each person.
This guide explains how to receive member events, send them from your server, and choose between member events and private channels.

Before you start

The connection must be signed in with a member identity. See Requiring authorized connections for signin() and its authorization endpoint.

Receive events in your app

After signin() succeeds, bind the event name on bird.member. Use the same name that your server sends as event. Member events require no channel subscription.
import { BirdRealtime } from "@messagebird/realtime";

const bird = new BirdRealtime({
  appKey: "your-app-key",
  region: "us1",
  memberAuthEndpoint: "/bird/auth/member",
});

await bird.signin();

bird.member.bind("order.shipped", (data) => {
  showToast(`Order ${data.order_id} is on its way`);
});
The client retains the binding, signs in after reconnecting, and then resumes member-event delivery.
signin() is asynchronous in all three clients. It returns a promise in the browser, uses async in Swift, and suspends in Kotlin. Call it from the appropriate asynchronous context. One call arms automatic sign-in after later reconnects.

Send an event from your server

Call members.send with the app ID, member ID, and event:
await bird.realtime.members.send("rap_01krdgeqcxet5s7t44vh8rt9mg", "u_42", {
  event: "order.shipped",
  data: { order_id: "ord_123" },
});
u_42 is the member_id signed by your authorization endpoint. Use your system's existing identifier if it meets the member ID requirements.

Who receives the event

  • Every connection that member holds, across their tabs and devices. One call, however many connections.
  • Nobody else, even if another member's app binds the same event name.
  • Nothing if the member has no live connections. The call still succeeds because delivery is not queued and cannot confirm occupancy. Store durable notifications and load them when the member returns.

Member or private channel

Use a member eventUse a private channel
The recipient is the destination: personal notifications, account changesThe destination is a shared thing several people watch: a document, an order, a room
No channel to name or authorizeYou name the channel and authorize each subscription
No presence, connection counts, or client eventsPresence, connection counts, and client events are available

Next steps