---
source_url: https://www.pubnub.com/docs/chat/chat-sdk/learn/chat-entities/thread-message
title: ThreadMessage object
updated_at: 2026-05-25T11:25:07.973Z
---

> 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


# ThreadMessage object

`ThreadMessage` represents a single message in a thread.

## Properties

`ThreadMessage` extends `Message` and adds:

```ts
class ThreadMessage extends Message {
    parentChannelId: string
}
```

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| parentChannelId | string | Optional |  | Unique identifier of the main channel on which you create a subchannel (thread channel) and thread messages. |

## Methods

Available methods:

### Regular methods

* [editText()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/updates#edit-messages)
* [pinToParentChannel()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/threads#pin-thread-message-to-parent-channel)
* [restore()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/restore)
* [toggleReaction()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/reactions#add--delete)
* [unpinFromParentChannel()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/threads#unpin-thread-message-from-parent-channel)

### Event listeners

* [onThreadMessageUpdated()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/updates#get-message-updates)
* [(static) streamUpdatesOn()](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/threads#get-thread-updates)

All methods available under the [Message object](https://www.pubnub.com/docs/chat/chat-sdk/learn/chat-entities/message) also apply to `ThreadMessage`.

## Use case

`ThreadMessage` methods enable:

* Sending messages in [threads](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/threads)
* [Pinning](https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/threads#pin-thread-message-to-parent-channel) thread messages to the parent channel