---
source_url: https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/chat-entities/thread-channel
title: ThreadChannel object
updated_at: 2026-06-16T12:48:56.595Z
---

> 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


# ThreadChannel object

`ThreadChannel` represents a single thread (channel) in a chat.

## Properties

The `ThreadChannelImpl` class extends [ChannelImpl](https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/chat-entities/channel) and implements the `ThreadChannel` protocol. It takes the following properties:

```swift
extension ThreadChannelImpl: ThreadChannel {
    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?
    public var parentMessage: MessageImpl
    public var parentChannelId: String

    ...
}
```

| 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 |  | One of the available [channel types](https://www.pubnub.com/docs/chat/swift-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 Swift SDK instead of Chat SDK, whose type provided in channel metadata is different than the three default Chat SDK types. |
| parentMessage | MessageImpl | Optional |  | Message for which the thread was created. |
| parentChannelId | String | Optional |  | Unique identifier of the main channel on which you create a subchannel (thread channel) and thread messages. |

## Methods

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

Click on each method for more details.

* [getHistory()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/threads#get-historical-thread-message)
* [pinMessage()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/threads#pin-thread-message-to-thread-channel)
* [pinMessageToParentChannel()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/threads#pin-thread-message-to-parent-channel)
* [unpinMessage()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/threads#unpin-thread-message-from-thread-channel)
* [unpinMessageFromParentChannel()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/threads#unpin-thread-message-from-parent-channel)
* All methods available under the [Channel object](https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/chat-entities/channel#methods).

## Event listeners

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

Click on each method for more details.

* [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)
* [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/messages/threads#get-thread-channel-updates)
* All event listeners available under the [Channel object](https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/chat-entities/channel#event-listeners).

## Use case

`ThreadChannel` methods enable:

* Creating and replying in [threads](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/threads)
* [Pinning](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/threads#pin-thread-message-to-thread-channel) important information