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

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

**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 (related to the token) 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>


## OpenAPI

````yaml /api/agent-chat/v3.7/openapi.json post /action/transfer_chat
openapi: 3.0.0
info:
  title: Agent Chat API
  description: >-
    The Agent Chat API allows you to manage chats, threads, events, and agent
    state.
  version: '3.7'
servers:
  - url: https://api.livechatinc.com/v3.7/agent
    description: Production server
security: []
paths:
  /action/transfer_chat:
    post:
      tags:
        - Chat access
      summary: Transfer chat
      description: >-
        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.
      operationId: transfer-chat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferChatRequest'
            example:
              id: PJ0MRSHTDG
              target:
                type: group
                ids:
                  - 19
      responses:
        '200':
          description: Chat transferred.
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - chats--all:rw
components:
  schemas:
    TransferChatRequest:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The chat ID.
        target:
          type: object
          description: >-
            Transfer target. If not provided, the chat will be transferred
            within the current group.
          required:
            - type
            - ids
          properties:
            type:
              type: string
              enum:
                - group
                - agent
              description: The type of transfer target.
            ids:
              type: array
              items:
                type: string
              description: An array of group or agent IDs to transfer the chat to.
        ignore_agents_availability:
          type: boolean
          default: false
          description: >-
            If `true`: allows the chat to be enqueued after the transfer. If
            `false`: fails when unable to immediately assign any agent from the
            requested groups.
        ignore_requester_presence:
          type: boolean
          default: false
          description: >-
            If `true`: the requester doesn't need to be present on the list of
            chat users.
  securitySchemes:
    PersonalAccessToken:
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
      type: http
      scheme: basic
    OAuth2BearerToken:
      description: >-
        This API uses OAuth2 with the implicit grant flow. <a
        href="/authentication/oauth-authorization#implicit-grant">Learn about
        the implicit grant flow.</a>
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com
          scopes:
            chats--all:ro: Read all chats
            chats--all:rw: Read and write all chats
            chats--access:ro: Read chats from groups the agent is a member of
            chats--access:rw: Read and write chats from groups the agent is a member of
        authorizationCode:
          authorizationUrl: https://accounts.livechat.com
          tokenUrl: https://accounts.livechat.com/token
          scopes:
            chats--all:ro: Read all chats
            chats--all:rw: Read and write all chats
            chats--access:ro: Read chats from groups the agent is a member of
            chats--access:rw: Read and write chats from groups the agent is a member of

````