---
source_url: https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/chat-entities/channel
title: Channel entity
updated_at: 2026-06-16T12:48:56.035Z
---

> 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 entity

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

## Properties

The `ChannelImpl` class implements the `Channel` protocol and takes the following properties:

```swift
extension ChannelImpl: Channel {
    public var chat: ChatImpl
    public var id: String
    public var name: String?
    public var custom: [String: JSONCodableScalar]?
    public var channelDescription: String?
    public var updated: String?
    public var status: String?
    public var type: ChannelType?

    ...
}
```

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| chat | ChatImpl | Optional |  | Reference to the main `Chat` protocol. |
| 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 | [String: | Optional |  | Any custom properties or metadata associated with the channel in the form of a dictionary of key-value pairs. [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 |  | When a channel is created, one of the available [channel types](https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/glossary) is assigned (depending on the Swift Chat SDK method used for channel creation):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 Swift SDK instead of Swift 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.

Click on each method for more details.

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

## Event listeners

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

Click on each method for more details.

* [onCustomEvent()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/custom-events#create-and-send-events)
* [onDeleted()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/updates#get-channel-updates)
* [onMessageReceived()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/watch)
* [onMessageReported()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/moderation#listen-to-report-events)
* [onPresenceChanged()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/users/presence#get-presence-updates)
* [onReadReceiptReceived()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/read-receipts#stream-read-receipts)
* [onTypingChanged()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/typing-indicator#get-typing-events)
* [onUpdated()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/updates#get-channel-updates)
* [streamUpdatesOn()](https://www.pubnub.com/docs/chat/swift-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/swift-chat-sdk/build/features/messages/send-receive) messages.
* [Create and manage](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/create) a 1:1, group, or public channel (chat).
* [Invite](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/invite) others to join the channel.
* Configure a [typing indicator](https://www.pubnub.com/docs/chat/swift-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/swift-chat-sdk/build/features/push-notifications), not to miss a single message.