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

# Update agent

> Updates an existing agent.



## OpenAPI

````yaml /api-reference/openapi.en.json put /v1/agents/{id}
openapi: 3.1.0
info:
  title: Timely.ai API
  description: >-
    Timely.ai REST API for AI-powered customer service automation. Manage
    agents, conversations, contacts, and integrations.
  version: 1.0.0
  contact:
    name: Timely.ai
    email: contato@timelyai.com.br
    url: https://timelyai.com.br
servers:
  - url: https://api.timelyai.com.br
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: System
    description: Health check and API key introspection
  - name: Agents
    description: AI agents — creation, configuration, and management
  - name: Trainings
    description: Agent knowledge bases
  - name: Channels
    description: Communication channels (WhatsApp, Telegram, Email, Website)
  - name: Contacts
    description: Customer records
  - name: Conversations
    description: Conversation history and messages
  - name: Custom Fields
    description: CRM custom fields
  - name: Chats
    description: Active chat operations and human handoff
  - name: Messages
    description: Individual messages
  - name: MCP
    description: Model Context Protocol — servers and tools
  - name: Webhooks
    description: Outbound webhooks for real-time events
paths:
  /v1/agents/{id}:
    put:
      tags:
        - Agents
      summary: Update agent
      description: Updates an existing agent.
      operationId: updateAgent
      parameters:
        - $ref: '#/components/parameters/AgentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgent'
      responses:
        '200':
          description: Agent updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Agent'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    AgentId:
      name: id
      in: path
      required: true
      description: Agent ID
      schema:
        type: string
        format: uuid
  schemas:
    UpdateAgent:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
          maxLength: 500
        avatar_url:
          type: string
          format: uri
        model:
          type: string
        temperature:
          type: number
          minimum: 0
          maximum: 2
    Agent:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        avatar_url:
          type: string
          format: uri
        status:
          type: string
          enum:
            - active
            - inactive
        model:
          type: string
        temperature:
          type: number
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
  responses:
    ValidationError:
      description: Invalid request data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key obtained from the dashboard

````