Disabling Channels

Disabling a channel is a visibility and access toggle. The channel and all its data remain intact, but client-side read and write operations return a 403 Not Allowed error. Server-side access is preserved for admin operations like moderation and data export.

Disabled channels still appear in query results by default. This means users see the channel in their list but receive errors when attempting to open it. To hide disabled channels from users, filter them out in your queries:

await client.queryChannels({ disabled: false });

Re-enabling a channel restores full client-side access with all historical messages intact.

Disable a Channel

require 'getstream_ruby'

Models = GetStream::Generated::Models

# disable a channel with full update
client.chat.update_channel("messaging", "general", Models::UpdateChannelRequest.new(
  data: Models::ChannelInputRequest.new(disabled: true)
))

# disable a channel with partial update
client.chat.update_channel_partial("messaging", "general", Models::UpdateChannelPartialRequest.new(
  set: { 'disabled' => true }
))

# enable a channel with full update
client.chat.update_channel("messaging", "general", Models::UpdateChannelRequest.new(
  data: Models::ChannelInputRequest.new(disabled: false)
))

# enable a channel with partial update
client.chat.update_channel_partial("messaging", "general", Models::UpdateChannelPartialRequest.new(
  set: { 'disabled' => false }
))
Info:

To prevent new messages while still allowing users to read existing messages, use freeze the channel instead.

Add Chat to my app: getstream.io/SKILL.md

The fastest way to build with Stream. Start a new project or improve an existing one. Full CLI and documentation integration out of the box.


Ask your agent:

/stream Build me a Social App with Feeds and Moderation.
/stream Any livestream calls running?
/stream Chat Ruby: <Your Question>