- [Resource: Thread](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.SCHEMA_REPRESENTATION)
  - [ThreadMetadata](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.ThreadMetadata)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.ThreadMetadata.SCHEMA_REPRESENTATION)
  - [Icon](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.Icon)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.Icon.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#METHODS_SUMMARY)

## Resource: Thread

A thread in a Google Chat space. For example usage, see [Start or reply to a message thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).

If you specify a thread when creating a message, you can set the [`messageReplyOption`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption) field to determine what happens if no matching thread is found.

| JSON representation |
|---|
| ``` { "name": string, "threadKey": string, "threadMetadata": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.ThreadMetadata`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name of the thread. Example: `spaces/{space}/threads/{thread}` |
| `threadKey` | `string` Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread `name` field instead. |
| `threadMetadata` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.ThreadMetadata`)`` Optional. Thread metadata for rendering and managing this thread as a session. <br /> > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. <br /> |

### ThreadMetadata

Thread metadata used to render and manage a session in Google Chat. Only applicable to agentic features enabled apps.

<br />

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.

<br />

| JSON representation |
|---|
| ``` { "title": string, "icon": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.Icon`) } } ``` |

| Fields ||
|---|---|
| `title` | `string` Optional. Title of the thread. A title describing the session's topic. The maximum length is 1024 characters. If not specified, it defaults to the first message in the session. |
| `icon` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads#Thread.Icon`)`` Optional. Icon of the thread. An icon displayed next to the session title. Only material icons are supported. If not specified, it defaults to the [Notes](https://fonts.google.com/icons?selected=Material+Symbols+Outlined:notes) Material Icon. |

### Icon

An icon displayed in a prompt or thread.

<br />

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.

<br />

| JSON representation |
|---|
| ``` { "altText": string, "materialIcon": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/MaterialIcon`) } } ``` |

| Fields ||
|---|---|
| `altText` | `string` Optional. The alternative text of this icon that's used for accessibility. |
| An icon displayed in a prompt. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `materialIcon` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/MaterialIcon`)`` Displays one of the [Google Material Icons](https://fonts.google.com/icons). For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material+Symbols+Outlined:check_box:FILL@0;wght@400;GRAD@0;opsz@48), use "materialIcon": { "name": "check_box" } |
| End of mutually exclusive fields. ||

| ## Methods ||
|---|---|
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads/get` | > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. Gets details about a thread in a 1:1 App DM space. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads/list` | > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. Lists threads in a 1:1 App DM space. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.threads/patch` | > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. Updates a thread in a 1:1 App DM space. |