Channel types allow you to configure which features are enabled, and how permissions work.
For example you can disable typing indicators, give rights to moderators, or configure channels to be accessible even if you're not a member.
The easiest way to change your channel types is the dashboard. The docs below show how to change channel types via the API.
There are five built-in channel types with good default for these use cases.
Messaging : Good default for dating, marketplace, and other social app chat use cases
AI : For creating user to LLM style chat experiences, text, voice & video.
Livestream : For livestreaming or live shopping experiences
Team : If you want to build your own version of Slack or something similar, start here.
Gaming : Defaults for adding chat to video games.
The five default channel types come with good default permission policies. You can find more information on how to manage permissions in the Channel Types section .
JavaScript Python Ruby PHP Java C# Go
// Create a new channel type
await client. createChannelType ({
name: "my-channel-type" ,
typing_events: true ,
read_events: true ,
reactions: true ,
replies: true ,
});
// Update an existing channel type
await client. updateChannelType ( "my-channel-type" , {
reactions: false ,
max_message_length: 1000 ,
}); # Create a new channel type
client.chat.create_channel_type(
name = "my-channel-type" ,
automod = "disabled" ,
automod_behavior = "flag" ,
max_message_length = 5000 ,
typing_events = True ,
read_events = True ,
reactions = True ,
replies = True ,
)
# Update an existing channel type
client.chat.update_channel_type(
name = "my-channel-type" ,
automod = "disabled" ,
automod_behavior = "flag" ,
max_message_length = 1000 ,
reactions = False ,
) require 'getstream_ruby'
Models = GetStream :: Generated :: Models
# Create a new channel type
client. chat . create_channel_type ( Models :: CreateChannelTypeRequest . new (
name: 'my-channel-type' ,
typing_events: true ,
read_events: true ,
reactions: true ,
replies: true
))
# Update an existing channel type
client. chat . update_channel_type ( 'my-channel-type' , Models :: UpdateChannelTypeRequest . new (
reactions: false ,
max_message_length: 1000
)) use GetStream\ChatClient ;
use GetStream\GeneratedModels as Models ;
$client = new ChatClient ( "{{ api_key }}" , "{{ api_secret }}" );
// Create a new channel type
$client -> createChannelType ( new Models\CreateChannelTypeRequest (
name : "my-channel-type" ,
typingEvents : true ,
readEvents : true ,
reactions : true ,
replies : true ,
));
// Update an existing channel type
$client -> updateChannelType ( "my-channel-type" , new Models\UpdateChannelTypeRequest (
reactions : false ,
maxMessageLength : 1000 ,
)); // Create a new channel type
chat. createChannelType (CreateChannelTypeRequest. builder ()
. name ( "my-channel-type" )
. automod ( "disabled" ). automodBehavior ( "flag" ). maxMessageLength ( 5000 )
. typingEvents ( true ). readEvents ( true ). reactions ( true ). replies ( true )
. build ()). execute ();
// Update an existing channel type
chat. updateChannelType ( "my-channel-type" , UpdateChannelTypeRequest. builder ()
. automod ( "disabled" ). automodBehavior ( "flag" ). maxMessageLength ( 1000 )
. reactions ( false )
. build ()). execute (); // Create a new channel type
await chat. CreateChannelTypeAsync ( new CreateChannelTypeRequest
{
Name = "my-channel-type" ,
TypingEvents = true ,
ReadEvents = true ,
Reactions = true ,
Replies = true ,
});
// Update an existing channel type
await chat. UpdateChannelTypeAsync ( "my-channel-type" , new UpdateChannelTypeRequest
{
Reactions = false ,
MaxMessageLength = 1000 ,
}); // Create a new channel type
client. Chat (). CreateChannelType (ctx, & getstream . CreateChannelTypeRequest {
Name: "my-channel-type" ,
TypingEvents: getstream. PtrTo ( true ),
ReadEvents: getstream. PtrTo ( true ),
Reactions: getstream. PtrTo ( true ),
Replies: getstream. PtrTo ( true ),
})
// Update an existing channel type
client. Chat (). UpdateChannelType (ctx, "my-channel-type" , & getstream . UpdateChannelTypeRequest {
Automod: "disabled" ,
AutomodBehavior: "flag" ,
MaxMessageLength: 1000 ,
Reactions: getstream. PtrTo ( false ),
})
Channel types can be configured with specific permissions and features.
As you can see in the examples below, you can define your own Channel types and configure them to fit your needs. The Channel type allows you to configure these features:
typing_events : Controls if typing indicators are shown.
read_events : Controls whether the chat shows how far you've read.
connect_events : Determines if events are fired for connecting and disconnecting to a chat.
custom_events : Determines if channel watchers will receive custom events.
reactions : If users are allowed to add reactions to messages.
search : Controls if messages should be searchable.
replies : Enables message threads and replies.
quotes : Allows members to quote messages (inline replies).
mutes : Determines if users are able to mute other users.
uploads : Allows image and file uploads within messages.
url_enrichment : When enabled, messages containing URLs will be enriched automatically with image and text related to the message. This is disabled by default for the livestream channel type and we do not recommend enabling it for performance reasons.
count_messages : Enables message counting on new channels. When enabled the message count will be present in the channel response.
user_message_reminders : Allow users to set reminders for messages. More information can be found here .
mark_messages_pending : When enabled, messages marked as pending are only visible to the sender until approved.
polls : Allows channel members to create and vote on polls.
skip_last_msg_update_for_system_msgs : When disabled, system messages will affect the channel's last_message_at timestamp.
location_sharing : Allows members to share their locations with other members.
read_receipts : Allows members to see when messages are delivered (delivery events).
partitioning : Automatically chunks messages into virtual partitions for better performance at larger scales (dynamic partitioning).
push_notifications : If messages are allowed to generate push notifications.
name type description default optional name string The name of the channel type must be unique per application max_message_length int The max message length 5,000 ✓ typing_events boolean Enable typing events true ✓ read_events boolean Enable read events true ✓ connect_events boolean Enable connect events true ✓ custom_events boolean Enable custom events true ✓ reactions boolean Enable message reactions true ✓ search boolean Enable message search true ✓ replies boolean Enable replies (threads) true ✓ quotes boolean Allow quotes/inline replies true ✓ mutes boolean Enable mutes true ✓ uploads boolean Enable file and image upload true ✓ url_enrichment boolean Automatically enrich URLs true ✓ count_messages boolean Enables message counting on new channels false ✓ user_message_reminders boolean Allow users to set reminders and bookmarks for messages false ✓ mark_messages_pending boolean Messages marked as pending are only visible to the sender until approved false ✓ polls boolean Allow channel members to create and vote on polls false ✓ skip_last_msg_update_for_system_msgs boolean When disabled, system messages will affect the channel's last_message_at timestamp false ✓ location_sharing boolean Allow members to share their locations with other members false ✓ read_receipts boolean Allow members to see when messages are delivered (delivery events) true ✓ partitioning boolean Automatically chunks messages into virtual partitions for better performance at larger scales false ✓ push_notifications boolean Enable push notifications true ✓ automod string Disabled, simple or AI are valid options for the Automod (AI based moderation is a premium feature) simple ✓ commands list of string The commands that are available on this channel type [] ✓
You need to use server-side authentication to create, edit, or delete a channel type.
JavaScript Python Ruby PHP Java C# Go
import { DenyAll, AnyRole } from "stream-chat" ;
await client. createChannelType ({
name: "public" ,
mutes: false ,
reactions: false ,
}); client.chat.create_channel_type(
name = "public" ,
automod = "disabled" ,
automod_behavior = "flag" ,
max_message_length = 5000 ,
mutes = False ,
reactions = False ,
) require 'getstream_ruby'
Models = GetStream :: Generated :: Models
client. chat . create_channel_type ( Models :: CreateChannelTypeRequest . new (
name: 'public' ,
mutes: false ,
reactions: false
)) $client -> createChannelType ( new Models\CreateChannelTypeRequest (
name : "public" ,
mutes : false ,
reactions : false ,
)); chat. createChannelType (CreateChannelTypeRequest. builder ()
. name (channelName). automod ( "disabled" ). automodBehavior ( "flag" ). maxMessageLength ( 5000 )
. mutes ( false ). reactions ( false )
. build ()). execute (); await chat. CreateChannelTypeAsync ( new CreateChannelTypeRequest
{
Name = "public" ,
Reactions = false ,
Mutes = false ,
}); client. Chat (). CreateChannelType (ctx, & getstream . CreateChannelTypeRequest {
Name: "public" ,
Automod: "disabled" ,
AutomodBehavior: "flag" ,
MaxMessageLength: 5000 ,
Mutes: getstream. PtrTo ( false ),
Reactions: getstream. PtrTo ( false ),
})
If not provided, the permission settings will default to the ones from the built-in "messaging" type.
Please note that applications have a hard limit of 50 channel types. If you need more than this please have a look at the Multi-tenant & Teams section.
You can retrieve the list of all channel types defined for your application.
JavaScript PHP Python Go Ruby Java C#
const channelTypes = await client. listChannelTypes (); $response = $client -> listChannelTypes (); client.chat.list_channel_types() client. Chat (). ListChannelTypes (ctx, & getstream . ListChannelTypesRequest {}) require 'getstream_ruby'
Models = GetStream :: Generated :: Models
client. chat . list_channel_types chat. listChannelTypes (ListChannelTypesRequest. builder (). build ()). execute (); await chat. ListChannelTypesAsync ();
You can retrieve a channel type definition with this endpoint.
Features and commands are also returned by other channel endpoints.
JavaScript PHP Python Go Ruby Java C#
const channelType = await client. getChannelType ( "public" ); $response = $client -> getChannelType ( "public" ); client.chat.get_channel_type( name = "public" ) client. Chat (). GetChannelType (ctx, "public" , & getstream . GetChannelTypeRequest {}) require 'getstream_ruby'
Models = GetStream :: Generated :: Models
client. chat . get_channel_type ( 'public' ) chat. getChannelType ( "public" , GetChannelTypeRequest. builder (). build ()). execute (); await chat. GetChannelTypeAsync ( "public" );
Channel type features, commands and permissions can be changed. Only the fields that must change need to be provided, fields that are not provided to this API will remain unchanged.
JavaScript PHP Python Go Ruby Java C#
const update = await client. updateChannelType ( "public" , {
replies: false ,
commands: [ "all" ],
}); $client -> updateChannelType ( "public" , new Models\UpdateChannelTypeRequest (
replies : false ,
commands : [ "all" ],
)); client.chat.update_channel_type(
name = "public" ,
automod = "disabled" ,
automod_behavior = "flag" ,
max_message_length = 5000 ,
replies = False ,
commands = [ "all" ],
) client. Chat (). UpdateChannelType (ctx, "public" , & getstream . UpdateChannelTypeRequest {
Automod: "disabled" ,
AutomodBehavior: "flag" ,
MaxMessageLength: 5000 ,
Replies: getstream. PtrTo ( false ),
Commands: [] string { "all" },
}) require 'getstream_ruby'
Models = GetStream :: Generated :: Models
client. chat . update_channel_type ( 'public' , Models :: UpdateChannelTypeRequest . new (
replies: false ,
commands: [ 'all' ]
)) chat. updateChannelType ( "public" , UpdateChannelTypeRequest. builder ()
. automod ( "disabled" ). automodBehavior ( "flag" ). maxMessageLength ( 5000 )
. replies ( false ). commands (List. of ( "all" ))
. build ()). execute (); await chat. UpdateChannelTypeAsync ( "public" , new UpdateChannelTypeRequest
{
Replies = false ,
Commands = new List < string > { "all" },
});
Features of a channel can be updated by passing the boolean flags:
JavaScript PHP Python Go Ruby Java C#
const update = await client. updateChannelType ( "public" , {
typing_events: false ,
read_events: true ,
connect_events: true ,
search: false ,
reactions: true ,
replies: false ,
mutes: true ,
}); $client -> updateChannelType ( "public" , new Models\UpdateChannelTypeRequest (
typingEvents : false ,
readEvents : true ,
connectEvents : true ,
search : false ,
reactions : true ,
replies : false ,
mutes : true ,
)); client.chat.update_channel_type(
name = "public" ,
automod = "disabled" ,
automod_behavior = "flag" ,
max_message_length = 5000 ,
typing_events = False ,
read_events = True ,
connect_events = True ,
search = False ,
reactions = True ,
replies = False ,
mutes = True ,
) client. Chat (). UpdateChannelType (ctx, "public" , & getstream . UpdateChannelTypeRequest {
Automod: "disabled" ,
AutomodBehavior: "flag" ,
MaxMessageLength: 5000 ,
TypingEvents: getstream. PtrTo ( false ),
ReadEvents: getstream. PtrTo ( true ),
ConnectEvents: getstream. PtrTo ( true ),
Search: getstream. PtrTo ( false ),
Reactions: getstream. PtrTo ( true ),
Replies: getstream. PtrTo ( false ),
Mutes: getstream. PtrTo ( true ),
}) require 'getstream_ruby'
Models = GetStream :: Generated :: Models
client. chat . update_channel_type ( 'public' , Models :: UpdateChannelTypeRequest . new (
typing_events: false ,
read_events: true ,
connect_events: true ,
search: false ,
reactions: true ,
replies: false ,
mutes: true
)) chat. updateChannelType (channelName, UpdateChannelTypeRequest. builder ()
. automod ( "disabled" ). automodBehavior ( "flag" ). maxMessageLength ( 5000 )
. typingEvents ( false ). readEvents ( true ). connectEvents ( true )
. search ( false ). reactions ( true ). replies ( false ). mutes ( true )
. build ()). execute (); await chat. UpdateChannelTypeAsync ( "public" , new UpdateChannelTypeRequest
{
TypingEvents = false ,
ReadEvents = true ,
ConnectEvents = true ,
Search = false ,
Reactions = true ,
Replies = false ,
Mutes = true ,
});
Settings can also be updated by passing in the desired new values:
JavaScript PHP Python Go Ruby Java C#
const update = await client. updateChannelType ( "public" , {
automod: "disabled" ,
max_message_length: 140 ,
commands: [ "giphy" , "ban" ],
}); $client -> updateChannelType ( "public" , new Models\UpdateChannelTypeRequest (
automod : "disabled" ,
maxMessageLength : 140 ,
commands : [ "giphy" , "ban" ],
)); client.chat.update_channel_type(
name = "public" ,
automod = "disabled" ,
automod_behavior = "flag" ,
max_message_length = 140 ,
commands = [ "ban" , "unban" ],
) client. Chat (). UpdateChannelType (ctx, "public" , & getstream . UpdateChannelTypeRequest {
Automod: "disabled" ,
AutomodBehavior: "flag" ,
MaxMessageLength: 140 ,
Commands: [] string { "ban" , "unban" },
}) require 'getstream_ruby'
Models = GetStream :: Generated :: Models
client. chat . update_channel_type ( 'public' , Models :: UpdateChannelTypeRequest . new (
automod: 'disabled' ,
max_message_length: 140 ,
commands: [ 'ban' , 'unban' ]
)) chat. updateChannelType (channelName, UpdateChannelTypeRequest. builder ()
. automod ( "disabled" ). automodBehavior ( "flag" ). maxMessageLength ( 140 )
. commands (List. of ( "ban" , "unban" ))
. build ()). execute (); await chat. UpdateChannelTypeAsync ( "public" , new UpdateChannelTypeRequest
{
Automod = "disabled" ,
MaxMessageLength = 140 ,
Commands = new List < string > { "ban" , "unban" },
});
JavaScript PHP Python Go Ruby Java C#
const destroy = await client. deleteChannelType ( "public" ); $client -> deleteChannelType ( "public" ); client.chat.delete_channel_type( name = "public" ) client. Chat (). DeleteChannelType (ctx, "public" , & getstream . DeleteChannelTypeRequest {}) require 'getstream_ruby'
Models = GetStream :: Generated :: Models
client. chat . delete_channel_type ( 'public' ) chat. deleteChannelType ( "public" , DeleteChannelTypeRequest. builder (). build ()). execute (); await chat. DeleteChannelTypeAsync ( "public" );
You cannot delete a channel type if there are any active channels of that type.