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

# Update Agent

> Update agent fields for a location.



## OpenAPI

````yaml https://api.selcor.ai/v1/openapi.json patch /v1/voice/agent
openapi: 3.1.0
info:
  title: Selcor Partner API
  version: 0.1.0
  description: API for managing workspaces, locations, voice agents, and relay executions.
servers:
  - url: https://api.selcor.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/voice/agent:
    patch:
      tags:
        - Agent
      summary: Update Agent
      description: Update agent fields for a location.
      parameters:
        - schema:
            type: string
            example: clxyz123
          required: true
          name: location_id
          in: query
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                voice_id:
                  type: string
                  minLength: 1
                begin_message:
                  type: string
                llm_system_prompt:
                  type: string
                knowledge_base_text:
                  type: string
      responses:
        '200':
          description: Updated agent
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AgentUpdated'
                  request_id:
                    type: string
                required:
                  - data
                  - request_id
      security:
        - bearerAuth: []
components:
  schemas:
    AgentUpdated:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          nullable: true
        voice_id:
          type: string
          nullable: true
        language:
          type: string
          nullable: true
        begin_message:
          type: string
          nullable: true
        knowledge_base_text:
          type: string
          nullable: true
        updated_at:
          type: string
          nullable: true
          format: date-time
      required:
        - id
        - name
        - voice_id
        - language
        - begin_message
        - knowledge_base_text
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API key in format: sk_live_...'

````