#50532·supabase

Docs: conflicting descriptions of the private flag for realtime.send / realtime.send_binary

Author: leandrocpCreated Sep 17, 2026Updated Sep 17, 2026
Labelsdocumentationhelp wantedgood first issueinternal-issueto-triage

Page

https://supabase.com/docs/guides/realtime/broadcast#broadcast-from-the-database

Source: apps/docs/content/guides/realtime/broadcast.mdx

Problem

The private argument gets three different labels on this page, and two of them are reversed:

  • realtime.send example: false -- Public / Private flag
  • realtime.send_binary example: true -- Private / Public flag (defaults to true)
  • "Broadcasting a message from your database" section: FALSE -- Public / Private flag

None of them say what true and false do. private is a positional boolean, so a wrong value changes whether the message needs channel authorization, and a public message never reaches a private channel.

The note near the top of the page also calls it "the public flag" while the parameter is named private:

The public flag (the last argument in realtime.send(payload, event, topic, is_private)) only affects who can subscribe to the topic not who can read messages from the database.

That note explains the values correctly. The inline comments in the examples contradict it.

Ground truth

Both functions declare the argument the same way:

create or replace function realtime.send (
  payload jsonb,
  event   text,
  topic   text,
  private boolean default true
)

private => true sends on a private channel. private => false sends on a public channel. The default is true.

Fix

  • Use one label for the parameter in all three SQL examples.
  • State what the values do, for example -- private: true = private channel (default), false = public channel.
  • Show the true default in the realtime.send example too.
  • Call it "the private flag" in the note, to match the parameter name.
  • Consider named notation in the examples, so the call documents itself:
select realtime.send(
  payload => jsonb_build_object('hello', 'world'),
  event   => 'event',
  topic   => 'topic',
  private => true
);

Ref REAL-1051