---
source_url: https://www.pubnub.com/docs/chat/chat-sdk/learn/chat-entities/channel
title: Channel object
updated_at: 2026-05-22T11:03:58.168Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Channel object

The `Channel` object represents a single chat room where users can send and receive messages.

## Properties

The `Channel` object has the following properties:

```ts
class Channel {
    id: string,
    name?: string,
    custom?: ObjectCustom,
    description?: string,
    updated?: string,
    status?: string,
    type?: ChannelType
}
```

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id | string | Optional |  | Unique identifier for the channel. Verify the channel ID with our [validator](https://www.pubnub.com/docs/general/channels/overview#channel-name-validator). |
| name | string | Optional |  | Display name or title of the channel. |
| custom | ObjectCustom | Optional |  | Any 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](https://www.pubnub.com/docs/general/metadata/filtering) doesn't support filtering by custom properties. |
| description | string | Optional |  | Brief description or summary of the channel's purpose or content. |
| updated | string | Optional |  | Timestamp for the last time the channel was updated or modified. |
| status | string | Optional |  | Current status of the channel, like `online`, `offline`, or `archived`. |
| type | ChannelType | Optional |  | One of the available [channel types](https://www.pubnub.com/docs/chat/chat-sdk/learn/glossary):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. |

:::tip API limits
To learn about the maximum length of parameters used to set channel metadata, refer to [REST API docs](https://www.pubnub.com/docs/sdks/rest-api/set-channel-metadata).
:::

## Methods

You can call the following methods on the `Channel` object.

### Regular methods

* [createMessageDraft()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/drafts#create-a-draft-message)
* [delete()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/delete)
* [deleteFile()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/files#delete-files)
* [emitCustomEvent()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/custom-events#create-and-send-events)
* [fetchReadReceipts()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/read-receipts#fetch-read-receipts)
* [forwardMessage()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/forward)
* [getFiles()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/files#get-all-channel-files)
* [getHistory()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/history)
* [getMember()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/membership#check-membership)
* [getMembers()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/membership#get-members)
* [getMessage()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/details#get-message-details)
* [getMessageReportsHistory](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/moderation#get-historical-reported-messages)
* [getPinnedMessage()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/pinned#get)
* [getUserRestrictions()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/users/moderation#one-user-on-one-channel)
* [getUsersRestrictions()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/users/moderation#all-users-on-one-channel)
* [getUserSuggestions()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/users/mentions#get-user-suggestions)
* [hasMember()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/membership#check-membership)
* [invite()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/invite#invite-one-user)
* [inviteMultiple()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/invite#invite-multiple-users)
* [isPresent()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/users/presence#check-users-channel-presence)
* [join()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/join)
* [leave()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/leave)
* [pinMessage()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/pinned#pin)
* [registerForPush()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/push-notifications#register-selected-push-channels)
* [sendText()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/send-receive)
* [setRestrictions()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/users/moderation#mute-or-ban-users)
* [startTyping()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/typing-indicator#start-typing)
* [stopTyping()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/typing-indicator#stop-typing)
* [update()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/updates#update-channel-details)
* [unpinMessage()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/pinned#unpin)
* [unregisterFromPush()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/push-notifications#unregister-selected-push-channels)
* [whoIsPresent()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/users/presence#return-all-users-present-on-channel)

### Event listeners

* [onCustomEvent()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/custom-events#receive-current-events)
* [onDeleted()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/updates#get-channel-updates)
* [onMessageReceived()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/watch)
* [onMessageReported()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/moderation#listen-to-report-events)
* [onPresenceChanged()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/users/presence#get-presence-updates)
* [onReadReceiptReceived()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/read-receipts#get-read-receipts)
* [onTypingChanged()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/typing-indicator#get-typing-events)
* [onUpdated()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/updates#get-channel-updates)

## Use case

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

* Let users [send](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/send-receive) messages.
* [Create and manage](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/create) a 1:1, group, or public channel (chat).
* [Invite](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/invite) others to join the channel.
* Configure a [typing indicator](https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/typing-indicator) to track when someone in the room is writing a message.
* Register the channel for [mobile push notifications](https://www.pubnub.com/docs/chat/chat-sdk/build/features/push-notifications), not to miss a single message.