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

# Update Agent



## OpenAPI

````yaml /latest.yml PATCH /agents/{agent_id}
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /agents/{agent_id}:
    patch:
      tags:
        - Agents
      summary: Update Agent
      operationId: agents_update
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
        - name: agent_id
          in: path
          description: The ID of the agent.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSummary'
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-03-01'
        enum:
          - '2026-03-01'
  schemas:
    UpdateAgentRequest:
      title: UpdateAgentRequest
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: The name of the agent.
        description:
          type: string
          nullable: true
          description: The description of the agent.
        tts_voice:
          $ref: '#/components/schemas/VoiceId'
          nullable: true
          description: The voice to use for text-to-speech.
        tts_language:
          type: string
          nullable: true
          description: The language to use for text-to-speech.
    AgentSummary:
      title: AgentSummary
      type: object
      description: A summary of essential information about an agent.
      properties:
        id:
          type: string
          description: The ID of the agent.
        name:
          type: string
          description: >-
            The unique name of the agent, which can be used to identify the
            agent in the CLI.
        description:
          type: string
          nullable: true
          description: A brief description of the agent.
        created_at:
          type: string
          format: date-time
          description: The date and time when the agent was created.
        updated_at:
          type: string
          format: date-time
          description: The date and time when the agent was last updated.
        tts_voice:
          $ref: '#/components/schemas/VoiceId'
          description: The text-to-speech voice used by the agent.
        tts_language:
          type: string
          description: The language used for text-to-speech by the agent.
        webhook_id:
          type: string
          nullable: true
          description: >-
            The identifier for the webhook associated with the agent. Add or
            customize a webhook to your agent to receive events when calls are
            made to your agent via the Playground.
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: The date and time when the agent was deleted, if applicable.
        git_repository:
          $ref: '#/components/schemas/GitRepository'
          nullable: true
          description: The Git repository associated with the agent.
        git_deploy_branch:
          type: string
          nullable: true
          description: The branch of the Git repository used for deployment.
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumberSummary'
          nullable: true
          description: >-
            The phone numbers associated with the agent. Currently, you can only
            have one phone number per agent.
        has_text_to_agent_run:
          type: boolean
          description: Whether the agent has a text-to-agent run.
        deployment_count:
          type: integer
          description: The number of deployments associated with the agent.
      required:
        - id
        - name
        - created_at
        - updated_at
        - tts_voice
        - tts_language
        - has_text_to_agent_run
        - deployment_count
    VoiceId:
      title: VoiceId
      type: string
      description: The ID of the voice.
    GitRepository:
      title: GitRepository
      type: object
      properties:
        provider:
          type: string
          description: The provider of the Git repository.
          example: github
        account:
          type: string
          description: The account name associated with the Git repository.
        name:
          type: string
          description: The name of the Git repository.
      required:
        - provider
        - account
        - name
    PhoneNumberSummary:
      title: PhoneNumberSummary
      type: object
      properties:
        id:
          type: string
          description: The ID of the phone number.
        number:
          type: string
          description: The phone number with country code included.
      required:
        - id
        - number
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).

````