REST Resource: spaces.threads

Resource: Thread

A thread in a Google Chat space. For example usage, see Start or reply to a message thread.

If you specify a thread when creating a message, you can set the messageReplyOption field to determine what happens if no matching thread is found.

JSON representation
{
  "name": string,
  "threadKey": string,
  "threadMetadata": {
    object (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 (ThreadMetadata)

Optional. Thread metadata for rendering and managing this thread as a session.

ThreadMetadata

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

JSON representation
{
  "title": string,
  "icon": {
    object (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 (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 Material Icon.

Icon

An icon displayed in a prompt or thread.

JSON representation
{
  "altText": string,

  "materialIcon": {
    object (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 (MaterialIcon)

Displays one of the Google Material Icons.

For example, to display a checkbox icon, use

"materialIcon": {
  "name": "check_box"
}
End of mutually exclusive fields.

Methods

get

Gets details about a thread in a 1:1 App DM space.

list

Lists threads in a 1:1 App DM space.

patch

Updates a thread in a 1:1 App DM space.