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

# Update agent (partial)

> Update an existing agent



## OpenAPI

````yaml /openapi.yaml patch /agents/{id}
openapi: 3.0.0
info:
  title: Omnia Voice API
  description: >
    The Omnia Voice API allows you to programmatically manage voice agents,
    tools, phone numbers, and call logs.


    ## Authentication

    All API requests require an API key to be passed in the `X-API-Key` header.


    ## Rate Limiting

    API requests are rate limited to 1000 requests per hour per API key.
  version: 1.0.0
  contact:
    email: support@omnia-voice.com
servers:
  - url: https://api.omnia-voice.com/api/v1
    description: Production
  - url: https://dashboard.omnia-voice.com/api/v1
    description: Production (alias — same service)
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Manage voice agents
  - name: Tools
    description: Manage agent tools and actions
  - name: Phone Numbers
    description: Manage phone number assignments
  - name: Calls
    description: Create and manage voice calls
  - name: Call Logs
    description: View call history and details
  - name: Pricing
    description: Get pricing information and calculate call costs
  - name: Configuration
    description: Get configuration options (voices, languages)
paths:
  /agents/{id}:
    patch:
      tags:
        - Agents
      summary: Update agent (partial)
      description: Update an existing agent
      operationId: updateAgent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Agent ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentRequest'
      responses:
        '200':
          description: Agent updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          description: |
            Validation failed. Codes: `INVALID_LANGUAGE` when `languageId` does
            not exist, `INVALID_VOICE` when `voiceId` does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateAgentRequest:
      type: object
      description: |
        Partial update — send only what you are changing. Omitted fields keep
        their current values. Use `PATCH`; there is no `PUT` handler.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - SUSPENDED
        config:
          allOf:
            - $ref: '#/components/schemas/AgentConfig'
          description: Any subset of the configuration fields.
        changeNote:
          type: string
          description: |
            Recorded against the version this update creates. An update that
            changes nothing does not create a version.
    Agent:
      type: object
      description: |
        An agent as returned by the API.

        Note the asymmetry with the create/update payloads: you **write**
        configuration under `config`, and **read** it back under
        `standardConfig` (or `customProvider`). The `type` field tells you which
        one is present.
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - SUSPENDED
          description: Only ACTIVE agents accept calls.
        type:
          type: string
          enum:
            - standard
            - custom
          description: |
            `standard` agents carry `standardConfig`. `custom` agents use
            caller-supplied STT/LLM/TTS providers and carry `customProvider`.
        workspaceId:
          type: string
          nullable: true
          description: The workspace this agent belongs to.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        standardConfig:
          allOf:
            - $ref: '#/components/schemas/AgentConfig'
          description: Present when `type` is `standard`.
        actions:
          type: array
          description: Actions attached to this agent.
          items:
            type: object
        knowledgeBases:
          type: array
          description: Knowledge bases attached to this agent.
          items:
            type: object
    Error:
      $ref: '#/components/schemas/ValidationError'
    AgentConfig:
      type: object
      description: |
        How the agent sounds and behaves. Sent under `config` on create/update;
        returned under `standardConfig`.
      properties:
        languageId:
          type: string
          description: From `GET /languages`. Required on create.
        voiceId:
          type: string
          description: From `GET /voices`. Required on create.
        basePrompt:
          type: string
          description: |
            Who the agent is — role, tone, boundaries. The most important field.
            Required on create.
        greeting:
          type: string
          description: |
            Spoken verbatim as the opening line when `firstSpeaker` is `agent`.
            Ignored when the user speaks first.
        context:
          type: string
          nullable: true
          description: Background facts — hours, address, policies.
        questions:
          type: string
          nullable: true
          description: Follow-up questions the agent should work toward.
        customInstructions:
          type: string
          nullable: true
          description: Rules of engagement — always do this, never do that.
        recordingEnabled:
          type: boolean
          default: true
          description: Store call audio for later retrieval.
        temperature:
          type: number
          minimum: 0
          maximum: 1
          default: 0
          description: |
            Response variability. Keep at 0 for transactional agents, where
            consistency matters more than personality.
        maxDuration:
          type: integer
          minimum: 60
          maximum: 7200
          default: 3000
          description: Hard cap in seconds. The default of 3000 is 50 minutes.
        firstSpeaker:
          type: string
          enum:
            - agent
            - user
          default: agent
          description: |
            `agent` opens with `greeting`; `user` waits silently. Outbound calls
            always wait regardless of this value — the callee answers first.
        interruptible:
          type: boolean
          default: false
          description: |
            Whether the caller may talk over the agent's **first message only**.
            Every later turn is interruptible regardless.
        inactivityTimeout:
          type: integer
          minimum: 10
          maximum: 300
          description: >-
            Seconds of silence before the agent reacts. Omit to wait
            indefinitely.
        inactivityAction:
          type: string
          enum:
            - hang_up
            - prompt
          description: |
            `prompt` checks in and keeps waiting; `hang_up` says goodbye and
            ends the call. The agent always speaks first — never a silent
            disconnect.
        model:
          type: string
          enum:
            - gemma
            - llama
            - glm
          default: llama
          description: |
            `llama` (Meta Llama 3.3 70B) is the default and strongest general
            choice. `gemma` is faster and lighter. `glm` is strong multilingual.
        language:
          $ref: '#/components/schemas/Language'
        voice:
          $ref: '#/components/schemas/Voice'
    ValidationError:
      type: object
      description: |
        Error envelope returned by tool CRUD endpoints (`/agent-tools`,
        `/agent-tools/{id}`). The `details` field carries Zod's
        flatten() output — `formErrors` for top-level issues,
        `fieldErrors` keyed by field path for per-field issues.
      properties:
        error:
          type: string
          description: Top-level human-readable error message.
          example: Invalid request body
        details:
          type: object
          description: Field-level validation issues from the schema.
          properties:
            formErrors:
              type: array
              items:
                type: string
              description: Errors that aren't tied to a specific field.
            fieldErrors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
              description: |
                Map of field path → list of error messages for that
                field. Field paths use dot notation for nested fields
                (e.g. `staticParameters.account_id.location`).
              example:
                baseUrlPattern:
                  - Internal URLs are not allowed
    Language:
      type: object
      properties:
        id:
          type: string
          description: Language ID
        code:
          type: string
          description: ISO language code
        name:
          type: string
          description: Language name
        isActive:
          type: boolean
    Voice:
      type: object
      properties:
        id:
          type: string
          description: Voice ID
        name:
          type: string
          description: Voice name
        description:
          type: string
          nullable: true
          description: Voice description
        previewUrl:
          type: string
          nullable: true
          description: Audio preview URL
        languageCode:
          type: string
          description: >
            BCP-47 language code for this voice. May be a base code (e.g. `en`,
            `de`)

            or a regional variant (e.g. `en-GB`, `pt-BR`, `ar-SA`).
        gender:
          type: string
          nullable: true
          description: Voice gender, when available (e.g. `male`, `female`).
        isActive:
          type: boolean
          description: Whether the voice is currently selectable.
        language:
          type: object
          description: Resolved language metadata for `languageCode`.
          properties:
            code:
              type: string
              description: Same as `languageCode`.
            name:
              type: string
              description: Human-readable language name (e.g. `English (UK)`).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````