Channel object

Channel is an object that refers to a single chat room.

Properties

The Channel object has the following properties:

class Channel {
id: string,
name?: string,
custom?: ObjectCustom,
description?: string,
updated?: string,
status?: string,
type?: ChannelType
}
ParameterTypeDescription
idstringUnique identifier for the channel. Verify the channel ID with our validator.
namestring or undefinedDisplay name or title of the channel.
customObjectCustom or undefinedAny custom properties or metadata associated with the channel in the form of a JSON. Values must be scalar only; arrays or objects are not supported. App Context filtering language doesn’t support filtering by custom properties.
descriptionstring or undefinedBrief description or summary of the channel's purpose or content.
updatedstring or undefinedTimestamp for the last time the channel was updated or modified.
statusstring or undefinedCurrent status of the channel, like online, offline, or archived.
typeChannelType or undefinedOne of the available channel types:
  • direct (1:1)
  • group (multiple people, restricted by invitation)
  • public (open chat for a large audience, anyone can join it)
  • unknown for channels created using the JavaScript SDK instead of Chat SDK, whose type provided in channel metadata is different than the three default Chat SDK types.
API limits

To learn about the maximum length of parameters used to set channel metadata, refer to REST API docs.

Methods

You can call the following methods on the Channel object.

Click on each method for more details.

Use case

For example, you can use the Channel object methods to:

Last updated on