> ## Documentation Index
> Fetch the complete documentation index at: https://kapso-1adbad2d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a voice agent

> Updates an existing voice agent's details and provider configuration



## OpenAPI

````yaml api/legacy/openapi-agents.yaml patch /voice_agents/{id}
openapi: 3.0.3
info:
  title: Kapso External API - Agents & Flows API
  description: >-
    API for programmatically interacting with Kapso agents, executions, and
    WhatsApp conversations. This specification includes only Agents & Flows API
    endpoints.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /voice_agents/{id}:
    patch:
      tags:
        - Voice Agents
      summary: Update a voice agent
      description: Updates an existing voice agent's details and provider configuration
      operationId: updateVoiceAgent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - voice_agent
              properties:
                voice_agent:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Updated Voice Agent Name
                    provider_type:
                      type: string
                      enum:
                        - pipecat
                      example: pipecat
                    provider:
                      type: object
                      properties:
                        public_api_key:
                          type: string
                          example: pk_live_abc123
                        private_api_key:
                          type: string
                          example: sk_live_xyz789
                        agent_name:
                          type: string
                          example: support-agent-v2
                        base_url:
                          type: string
                          example: https://api.pipecat.ai
      responses:
        '200':
          description: Voice agent updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/VoiceAgent'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Voice agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    VoiceAgent:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: voice-agent-123abc
        name:
          type: string
          example: Customer Support Voice Agent
        provider:
          type: object
          description: Voice provider configuration
          properties:
            type:
              type: string
              example: pipecat_provider
              description: Provider type
            kind:
              type: string
              example: pipecat
              description: Provider kind identifier
            agent_name:
              type: string
              example: support-agent-v1
              description: Agent name configured in the provider
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        status:
          type: integer
          example: 404
        message:
          type: string
          example: The requested resource could not be found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required for all endpoints

````