> ## Documentation Index
> Fetch the complete documentation index at: https://developer.gptmaker.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Atualizar regra

>  Atualiza uma regra de transferência existente



## OpenAPI

````yaml PUT /v2/agent/{agentId}/transfer-rules/{transfer-rule-id}
openapi: 3.0.1
info:
  title: OpenAPI GPT Maker
  description: Documentação completa da API do GPT Maker
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.gptmaker.ai
security:
  - bearerAuth: []
paths:
  /v2/agent/{agentId}/transfer-rules/{transfer-rule-id}:
    put:
      description: ' Atualiza uma regra de transferência existente'
      parameters:
        - name: agentId
          in: path
          description: ID do agente
          required: true
          schema:
            type: string
        - name: transfer-rule-id
          in: path
          description: ID da regra de transferência
          required: true
          schema:
            type: string
      requestBody:
        description: Dados da regra de transferência a ser atualizada
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    instructions:
                      type: string
                      description: Instruções visíveis na transferência
                    returnOnFinish:
                      type: boolean
                      description: Define se deve retornar ao assistente após o atendimento
                    type:
                      enum:
                        - HUMAN
                        - AGENT
                    agentId:
                      type: string
                      nullable: true
                      description: Id do agente de destino (se aplicável)
                    userId:
                      type: string
                      nullable: true
                      description: Id do usuário de destino (se aplicável)
        required: true
      responses:
        '204':
          description: Regra de transferência atualizada com sucesso
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Id da regra
                  createdAt:
                    type: string
                    description: Data de criação da regra de transferência
                  instructions:
                    type: string
                    description: Instruções visíveis na transferência
                  returnOnFinish:
                    type: boolean
                    description: Define se deve retornar ao assistente após o atendimento
                  type:
                    enum:
                      - HUMAN
                      - AGENT
                  agentId:
                    type: string
                    nullable: true
                    description: Id do agente de destino (se aplicável)
                  userId:
                    type: string
                    nullable: true
                    description: Id do usuário de destino (se aplicável)
        '400':
          description: Erro inesperado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Erro de token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
components:
  schemas:
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    Error403:
      required:
        - error
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````