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

# Update an agent

> Only the fields you send are changed.



## OpenAPI

````yaml /openapi.json patch /v1/agents/{id}
openapi: 3.1.0
info:
  title: Wixzel Voice API
  version: '2026-09-01'
  description: >-
    APIs for AI voice agents. One key, one balance, every voice engine.


    ## Authentication

    Send your key as `Authorization: Bearer wv_live_...`. Keys are scoped —
    grant only what an integration needs. There is no admin scope.


    ## Versioning

    The `/v1` prefix covers additive changes. Behavioural changes ship behind a
    dated `Wixzel-Version` header, and existing keys keep the behaviour they
    were created with.


    ## Money

    Amounts are integer **micro-USD** (1,000,000 = $1.00). Voice usage is billed
    per second, per token and per character, so a float dollar figure cannot
    represent it without disagreeing with the ledger.


    ## Errors

    Every error carries a stable `code` and a `request_id`. Match on `code`; the
    `message` is for humans and may change.
  contact:
    name: Wixzel Voice
    url: https://voice.wixzel.com
servers:
  - url: https://api.voice.wixzel.com
    description: Production
security: []
tags:
  - name: Calls
    description: Place calls and read what happened on them.
  - name: Agents
    description: The prompt, voice and behaviour of a caller.
  - name: Leads
    description: People to call, and data to merge into prompts.
  - name: Campaigns
    description: Call a list of leads with one agent.
  - name: Knowledge bases
    description: Facts an agent can draw on mid-call.
  - name: Phone numbers
    description: Numbers on your SIP trunks.
  - name: SIP trunks
    description: Your carrier connections.
  - name: Appointments
    description: Bookings, including ones agents make on calls.
  - name: Usage
    description: Itemised billing lines.
  - name: Billing
    description: Balance, ledger and top-ups.
  - name: API keys
    description: Create, scope and rotate keys.
  - name: Engines
    description: What the platform can serve, and what it costs.
paths:
  /v1/agents/{id}:
    patch:
      tags:
        - Agents
      summary: Update an agent
      description: Only the fields you send are changed.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            example: 6a96a3ead6e886d42462dd3e
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgent'
      responses:
        '200':
          description: The updated an agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited. Retry after the interval in `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateAgent:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
        system_prompt:
          type: string
          minLength: 1
          maxLength: 20000
          description: >-
            The agent's instructions. Spoken conversation, so keep it short and
            concrete.
        opening_message:
          type: string
          minLength: 1
          maxLength: 1000
          description: >-
            Spoken as soon as the call connects. Supports {{name}} style merge
            fields. Required — an agent without one answers in silence.
        voice:
          allOf:
            - $ref: '#/components/schemas/VoiceConfig'
            - type: object
        language:
          type: string
          default: en-US
        knowledge_base_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          example: 6a96a3ead6e886d42462dd3e
        outbound_phone_number_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          example: 6a96a3ead6e886d42462dd3e
        appointment_booking_enabled:
          type: boolean
          default: false
    Agent:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{24}$
          example: 6a96a3ead6e886d42462dd3e
        object:
          type: string
          enum:
            - agent
        name:
          type: string
        system_prompt:
          type: string
        opening_message:
          type:
            - string
            - 'null'
        voice:
          $ref: '#/components/schemas/VoiceConfig'
        language:
          type: string
        knowledge_base_id:
          type:
            - string
            - 'null'
          pattern: ^[0-9a-f]{24}$
          example: 6a96a3ead6e886d42462dd3e
        outbound_phone_number_id:
          type:
            - string
            - 'null'
          pattern: ^[0-9a-f]{24}$
          example: 6a96a3ead6e886d42462dd3e
        appointment_booking_enabled:
          type: boolean
        created_at:
          type: string
          format: date-time
          description: ISO 8601, always UTC.
          example: '2026-09-01T12:00:00.000Z'
      required:
        - id
        - object
        - name
        - system_prompt
        - opening_message
        - voice
        - language
        - knowledge_base_id
        - outbound_phone_number_id
        - appointment_booking_enabled
        - created_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - insufficient_credits
                - not_found_error
                - conflict_error
                - api_error
            code:
              type: string
              description: Stable machine-readable code.
              example: agent_not_found
            message:
              type: string
              description: >-
                Human-readable explanation. Do not match on this — match on
                code.
            param:
              type: string
              description: Which field caused the failure, when applicable.
            doc_url:
              type: string
            request_id:
              type: string
              description: Quote this when asking for help.
              example: req_01HXYZ...
          required:
            - type
            - code
            - message
            - request_id
      required:
        - error
    VoiceConfig:
      type:
        - object
        - 'null'
      properties:
        stt:
          $ref: '#/components/schemas/SttConfig'
        llm:
          $ref: '#/components/schemas/LlmConfig'
        tts:
          $ref: '#/components/schemas/TtsConfig'
        realtime:
          $ref: '#/components/schemas/RealtimeConfig'
        turn_taking:
          $ref: '#/components/schemas/TurnTaking'
      description: >-
        Either a composed pipeline (stt + llm + tts) or a single realtime model.
        Not both.
    SttConfig:
      type: object
      properties:
        model:
          type: string
          pattern: ^[a-z0-9_-]+\/[a-zA-Z0-9._-]+$
          example: deepgram/nova-3
        language:
          type: string
          default: en-US
          description: BCP-47 tag, or "multi" for automatic detection.
        endpointing_ms:
          type: integer
          minimum: 50
          maximum: 3000
          description: >-
            Silence before a turn is considered finished. Lower is snappier and
            more prone to cutting people off.
      required:
        - model
    LlmConfig:
      type: object
      properties:
        model:
          type: string
          pattern: ^[a-z0-9_-]+\/[a-zA-Z0-9._-]+$
          example: openrouter/gpt-4o-mini
        temperature:
          type: number
          minimum: 0
          maximum: 2
        max_tokens:
          type: integer
          minimum: 1
          maximum: 4096
          description: >-
            Caps reply length. Long replies cost the caller waiting time as well
            as money.
      required:
        - model
    TtsConfig:
      type: object
      properties:
        model:
          type: string
          pattern: ^[a-z0-9_-]+\/[a-zA-Z0-9._-]+$
          example: elevenlabs/eleven_turbo_v2_5
        voice:
          type: string
          example: 21m00Tcm4TlvDq8ikWAM
        stability:
          type: number
          minimum: 0
          maximum: 1
        similarity_boost:
          type: number
          minimum: 0
          maximum: 1
        speed:
          type: number
          minimum: 0.5
          maximum: 2
      required:
        - model
    RealtimeConfig:
      type: object
      properties:
        model:
          type: string
          pattern: ^[a-z0-9_-]+\/[a-zA-Z0-9._-]+$
          example: google/gemini-live
        voice:
          type: string
          example: Charon
        language:
          type: string
          default: auto
      required:
        - model
    TurnTaking:
      type: object
      properties:
        interrupt_sensitivity:
          type: string
          enum:
            - low
            - normal
            - high
          default: normal
          description: How readily the agent stops talking when the caller speaks.
        silence_wait_ms:
          type: integer
          minimum: 100
          maximum: 5000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Wixzel Voice API key: `Authorization: Bearer wv_live_...`. Keys are
        scoped; grant only what the integration needs.

````