> ## 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.

# Chat access

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

## Transfer chat

Transfers a chat to an agent or a group. The following restrictions apply:

* The transferred chat must be active.
* The requester must be present on the list of chat users. You can override it by setting the `ignore_requester_presence` parameter.
* When transferring directly to an agent, the agent must have access to the transferred chat.

**Specifics**

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

**Request**

| Parameter                    | Required | Type     | Notes                                                                                                                                                                                  |
| ---------------------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                         | Yes      | `string` | The chat ID.                                                                                                                                                                           |
| `target`                     | No       | `object` | If missing, the chat will be transferred within the current group.                                                                                                                     |
| `target.type`                | Yes      | `string` | Possible values: `group`, `agent`. Required when `target` is provided.                                                                                                                 |
| `target.ids`                 | Yes      | `array`  | An array of group or agent IDs. Required when `target` is provided.                                                                                                                    |
| `ignore_agents_availability` | No       | `bool`   | If set to `true`: allows the chat to be enqueued after the transfer. If set to `false`: fails when unable to immediately assign any agent from the requested groups. Default: `false`. |
| `ignore_requester_presence`  | No       | `bool`   | If set to `true`: the requester doesn't need to be present on the list of chat users.                                                                                                  |

No response payload.

```json title="Request" theme={null}
{
  "action": "transfer_chat",
  "payload": {
    "id": "PJ0MRSHTDG",
    "target": {
      "type": "group",
      "ids": [19]
    }
  }
}
```

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