---
agentTools:
  projectIndex: https://piperun-atendimentos.readme.io/llms.txt
---

# Transferir um atendimento para outro agente

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Versão 1.0",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{subdominio}.cxm.pipe.run",
      "variables": {
        "subdominio": {
          "default": "subdominio"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/talks/transfer_agent": {
      "post": {
        "summary": "Transferir um atendimento para outro agente",
        "description": "",
        "operationId": "transferir-um-atendimento-para-outro-agente",
        "parameters": [
          {
            "name": "agent_id",
            "in": "query",
            "description": "ID do novo agente",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "talk_id",
            "in": "query",
            "description": "ID do atendimento",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": 1,\n  \"message\": \"Conversa transferida de agente com sucesso.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "message": {
                      "type": "string",
                      "example": "Conversa transferida de agente com sucesso."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"Invalid token.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "409",
            "content": {
              "application/json": {
                "examples": {
                  "Transferência indisponível": {
                    "value": "{\n  \"success\": 0,\n  \"errors\": {\n    \"message\": [\n      \"Agente não tem permissão para fazer transferência de agentes.\"\n    ]\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "errors": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "Agente não tem permissão para fazer transferência de agentes."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Inconsistência nos dados enviados": {
                    "value": "{\n  \"message\": \"The given data was invalid.\",\n  \"errors\": {\n    \"agent_id\": [\n      \"O campo ID do agente selecionado é inválido.\"\n    ]\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The given data was invalid."
                    },
                    "errors": {
                      "type": "object",
                      "properties": {
                        "agent_id": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "O campo ID do agente selecionado é inválido."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request POST \\\n     --url 'https://{subdominio}.cxm.pipe.run/api/talks/transfer_agent?agent_id=1&talk_id=9834' \\\n     --header 'Accept: application/json' \\\n     --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNCIsImp0aSI6IjRjMWVjMmU1ODI2YzM0ZmQyMWEzMGIwODc2OWNjMmVjYzY2YzYxMGI2ZmNhNGI5YTg5MzgwNjc0ZDMzZDIxOThmMmEyNzNmNjMwMGRjMGQ4IiwiaWF0IjoxNjcyNjcwMzYwLjI1NDI5MywibmJmIjoxNjcyNjcwMzYwLjI1NDI5NywiZXhwIjoxNjcyNzU2NzYwLjE2OTY5Mywic3ViIjoiMjAiLCJzY29wZXMiOltdfQ.ZysAwtZxl2tBKO9ofDM5TXmYaVBcQhHA691i2sfcCerEhXXBh0Dmv3mWDg5HIyru5gz2Two1JLorx_SK8kLNInwsb7O8_MRU-BBYeZFX5mGc1WXAV0FJLfmR3WOk0pQcw1RrgXuhcus1moTigYvwkZfrHP-NaJqAhGiPp7aCnvJ8623JSEoq_NIc8HRJSMMAV2e7rwycBJsiSIIhNh3KzSy-r24zgVgk1s4T7k4kbHanZ8DdKVZxzit6c9yRS_1AFwlodPPPYTJkGgLzpIY48kuFmF7h9oRiiWxD6sg2i5aJvpjCLLh97dAj7hk88_T1m0ILKSDQ3lVt2xJZyYRrEy-UrgfTWV1IjKTjSxV62417eZJWnLWwuMYL6ThRuoupzSNJJbL9WHUcI8Gog-BxNemKuBSJbIHvxMcw1CGEu5rPjlzRfKJswEZwt58N_20iFrvZrTJmLztdUtjrQx_9i-msS-bmImweD8ITv7wNp9VifF29hOxUTTwSntTXoCfhd0bNottD6B5VDGwyCnBJrhNcvQ0cxjrgMllUQYw6O5LD2SgTrhs0uzJvfuTiF8nWn5AXWQEdEEX_lqHloybb8WhKpKXKn4iv7c9x-6QG8iIHQg-SFQO8cRKQQKj8XFjGFxmdpO8Iclr-QmNwGIZq04dbeAE_LaVk842zfz_xmsg' \\\n     --header 'Content-Type: application/json'",
              "name": "200 - OK"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "639b9eee56a9f8002b83200b:63a9edd8c1aab500109eea1e"
}
```