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

# Atualizar treinamento do agente

> Atualiza um treinamento existente do agente



## OpenAPI

````yaml https://api.jurichat.com/docs/client/openapi.json patch /agents/{agentId}/trainings/{id}
openapi: 3.1.0
info:
  title: JuriChat API — Documentação para Integradores
  description: ''
  version: 1.0.0
servers:
  - url: https://api.jurichat.com
    description: Production server
security:
  - apiKeyAuth: []
tags: []
paths:
  /agents/{agentId}/trainings/{id}:
    patch:
      tags:
        - Agent Trainings
      summary: Atualizar treinamento do agente
      description: Atualiza um treinamento existente do agente
      parameters:
        - schema:
            type: string
            pattern: ^[cC][^\s-]{8,}$
          in: path
          name: agentId
          required: true
          description: ID do agente.
        - schema:
            type: string
            pattern: ^[cC][^\s-]{8,}$
          in: path
          name: id
          required: true
          description: ID do treinamento.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  minLength: 1
                  maxLength: 1000
                  description: Pergunta do treinamento.
                answer:
                  type: string
                  minLength: 1
                  maxLength: 3000
                  description: Resposta esperada do agente.
                isActive:
                  type: boolean
                  description: Indica se o treinamento está ativo.
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[cC][^\s-]{8,}$
                  question:
                    type: string
                  answer:
                    type: string
                  isActive:
                    type: boolean
                  agentId:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - question
                  - answer
                  - isActive
                  - agentId
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                  code:
                    type: string
                  details:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: object
                        properties: {}
                        additionalProperties: true
                    description: Detalhes adicionais do erro.
                required:
                  - message
                  - statusCode
                additionalProperties: false
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-jurichat-api-key
      description: >-
        Chave de API do escritório (criada no painel). Envie o valor no header
        x-jurichat-api-key.

````