Overview

LAST EDIT Mar 19 2024

Almost all API requests are specific to a channel (e.g. add a message to channel “livestream:rockets”) and as we saw already, channels are organized in groups called channel types. All applications start with five default channel types, each have different name and are preconfigured to best fit one use-case.

Channel types can be configured with specific permissions and features.

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.

There are five built-in channel types:

  • Livestream: Sensible defaults in case you want to build chat like YouTube or Twitch.
  • Messaging: Configured for apps such as WhatsApp or Facebook Messenger.
  • Team: If you want to build your own version of Slack or something similar, start here.
  • Commerce: Good defaults for building something like your own version of Intercom or Drift.
  • Gaming: Defaults for adding chat to video games.

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.
  • search: Controls if messages should be searchable.
  • reactions: If users are allowed to add reactions to messages.
  • replies: Enables message threads and replies.
  • mutes: Determines if users are able to mute other users.
  • push_notifications: If messages are allowed to generate push notifications.
  • 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.

Channel Types Fields

Copied!
nametypedescriptiondefaultoptional
namestringThe name of the channel type must be unique per application
max_message_lengthintThe max message length5,000
typing_eventsdefaultEnable typing eventsdefault
read_eventsbooleanEnable read eventstrue
connect_eventsbooleanEnable connect eventstrue
searchbooleanEnable message searchtrue
reactionsbooleanEnable message reactionstrue
repliesbooleanEnable replies (threads)true
mutesbooleanEnable mutestrue
uploadsbooleanEnable file and image uploadtrue
url_enrichmentbooleanAutomatically enrich URLstrue
automodstringDisabled, simple or AI are valid options for the Automod (AI based moderation is a premium feature)simple
commandslist of stringThe commands that are available on this channel type[]
push_notificationsbooleanEnable push notificationstrue
quotesbooleanAllow quotes/inline repliestrue
You need to use server-side authentication to create, edit, or delete a channel type.

Creating a Channel Type

Copied!
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.

List Channel Types

Copied!

You can retrieve the list of all channel types defined for your application.

Get a Channel Type

Copied!

You can retrieve a channel type definition with this endpoint.

Features and commands are also returned by other channel endpoints.

Edit a Channel Type

Copied!

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.

Features of a channel can be updated by passing the boolean flags:

Settings can also be updated by passing in the desired new values:

Remove a Channel Type

Copied!
You cannot delete a channel type if there are any active channels of that type.