> ## Documentation Index
> Fetch the complete documentation index at: https://www.text.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Thread tags

> Reference of Thread tags methods for the Agent Chat RTM API v3.7.

## Tag thread

Tags a given thread. Read how to [list all available tags](/api/configuration/v3.7/tags/list-tags) and [create a new tag](/api/configuration/v3.7/tags/create-tag).

**Specifics**

|                     |                                                                                                                                                                                                                                                                                                        |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Action**          | `tag_thread`                                                                                                                                                                                                                                                                                           |
| **Required scopes** | <Tooltip tip="To tag a thread taking place in any group.">`chats--all:rw`</Tooltip> or <Tooltip tip="To tag a thread taking place in groups that the requester is a member of. The agent groups and the chat groups must overlap — at least one group must be in common.">`chats--access:rw`</Tooltip> |
| **Push message**    | `thread_tagged`                                                                                                                                                                                                                                                                                        |

**Request**

| Parameter   | Required | Type     | Notes                                          |
| ----------- | -------- | -------- | ---------------------------------------------- |
| `chat_id`   | Yes      | `string` | The ID of the chat you want to add a tag to.   |
| `thread_id` | Yes      | `string` | The ID of the thread you want to add a tag to. |
| `tag`       | Yes      | `string` | The tag name. It's case sensitive.             |

No response payload.

```json title="Request" theme={null}
{
  "action": "tag_thread",
  "payload": {
    "chat_id": "PW94SJTGW6",
    "thread_id": "PWS6GIKAKH",
    "tag": "support"
  }
}
```

```json title="Response" theme={null}
{
  "request_id": "<request_id>",
  "action": "tag_thread",
  "type": "response",
  "success": true,
  "payload": {}
}
```

***

## Untag thread

Untags a given thread.

**Specifics**

|                     |                                                                                                                                                                                                                                                                                                            |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Action**          | `untag_thread`                                                                                                                                                                                                                                                                                             |
| **Required scopes** | <Tooltip tip="To untag a thread taking place in any group.">`chats--all:rw`</Tooltip> or <Tooltip tip="To untag a thread taking place in groups that the requester is a member of. The agent groups and the chat groups must overlap — at least one group must be in common.">`chats--access:rw`</Tooltip> |
| **Push message**    | `thread_untagged`                                                                                                                                                                                                                                                                                          |

**Request**

| Parameter   | Required | Type     | Notes                                               |
| ----------- | -------- | -------- | --------------------------------------------------- |
| `chat_id`   | Yes      | `string` | The ID of the chat you want to remove a tag from.   |
| `thread_id` | Yes      | `string` | The ID of the thread you want to remove a tag from. |
| `tag`       | Yes      | `string` | The tag name. It's case sensitive.                  |

No response payload.

```json title="Request" theme={null}
{
  "action": "untag_thread",
  "payload": {
    "chat_id": "PW94SJTGW6",
    "thread_id": "PWS6GIKAKH",
    "tag": "support"
  }
}
```

```json title="Response" theme={null}
{
  "request_id": "<request_id>",
  "action": "untag_thread",
  "type": "response",
  "success": true,
  "payload": {}
}
```
