> ## 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.

# Create a voice agent

> Creates a new voice agent with provider configuration



## OpenAPI

````yaml api/legacy/openapi-agents.yaml post /voice_agents
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:
    post:
      tags:
        - Voice Agents
      summary: Create a voice agent
      description: Creates a new voice agent with provider configuration
      operationId: createVoiceAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - voice_agent
              properties:
                voice_agent:
                  type: object
                  required:
                    - name
                    - provider_type
                    - provider
                  properties:
                    name:
                      type: string
                      example: Customer Support Voice Agent
                    provider_type:
                      type: string
                      enum:
                        - pipecat
                      example: pipecat
                      description: Type of voice provider
                    provider:
                      type: object
                      required:
                        - public_api_key
                        - agent_name
                      properties:
                        public_api_key:
                          type: string
                          example: pk_live_abc123
                          description: Public API key for the provider
                        private_api_key:
                          type: string
                          example: sk_live_xyz789
                          description: Private API key for the provider (optional)
                        agent_name:
                          type: string
                          example: support-agent-v1
                          description: Agent name configured in the provider
                        base_url:
                          type: string
                          example: https://api.pipecat.ai
                          description: Custom base URL for the provider API (optional)
      responses:
        '201':
          description: Voice agent created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/VoiceAgent'
        '401':
          description: Unauthorized
          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

````