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

# Patch Agent



## OpenAPI

````yaml https://originshq.b-cdn.net/openapi_sayna.json patch /api/agents/{agent_id}
openapi: 3.1.0
info:
  title: core
  version: 0.1.0
servers: []
security: []
paths:
  /api/agents/{agent_id}:
    patch:
      summary: Patch Agent
      operationId: patch_agent_api_agents__agent_id__patch
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: integer
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallAgentRequestUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallAgentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CallAgentRequestUpdate:
      properties:
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
        agent_phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Phone Number
        voice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice Id
        welcome_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Welcome Text
        enabled:
          type: boolean
          title: Enabled
          default: true
        tools:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tools
        save_stats:
          type: boolean
          title: Save Stats
          default: true
        server_type:
          $ref: '#/components/schemas/ServerType'
          default: DEV
        call_type:
          anyOf:
            - $ref: '#/components/schemas/CallType'
            - type: 'null'
        provider_type:
          $ref: '#/components/schemas/ProviderType'
          default: EXOTEL
        llm_config_json:
          additionalProperties: true
          type: object
          title: Llm Config Json
          default: {}
        audio_config_json:
          additionalProperties: true
          type: object
          title: Audio Config Json
          default: {}
        call_settings_json:
          additionalProperties: true
          type: object
          title: Call Settings Json
          default: {}
        analytics_config_json:
          additionalProperties: true
          type: object
          title: Analytics Config Json
          default: {}
        tools_config_json:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tools Config Json
        created_from_template_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created From Template Id
        created_from_template_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created From Template Version
      type: object
      title: CallAgentRequestUpdate
    CallAgentResponse:
      properties:
        id:
          type: integer
          title: Id
        prompt:
          type: string
          title: Prompt
        agent_name:
          type: string
          title: Agent Name
        agent_phone_number:
          type: string
          title: Agent Phone Number
        voice_id:
          type: string
          title: Voice Id
        version:
          type: integer
          title: Version
        welcome_text:
          type: string
          title: Welcome Text
        tools:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tools
        enabled:
          type: boolean
          title: Enabled
        save_stats:
          type: boolean
          title: Save Stats
        server_type:
          $ref: '#/components/schemas/ServerType'
        call_type:
          $ref: '#/components/schemas/CallType'
        provider_type:
          $ref: '#/components/schemas/ProviderType'
          default: EXOTEL
        llm_config_json:
          additionalProperties: true
          type: object
          title: Llm Config Json
          default: {}
        audio_config_json:
          additionalProperties: true
          type: object
          title: Audio Config Json
          default: {}
        call_settings_json:
          additionalProperties: true
          type: object
          title: Call Settings Json
          default: {}
        tools_config_json:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tools Config Json
        analytics_config_json:
          additionalProperties: true
          type: object
          title: Analytics Config Json
          default: {}
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_from_template_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created From Template Id
        created_from_template_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created From Template Version
      type: object
      required:
        - id
        - prompt
        - agent_name
        - agent_phone_number
        - voice_id
        - version
        - welcome_text
        - enabled
        - save_stats
        - server_type
        - call_type
        - created_at
        - updated_at
      title: CallAgentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ServerType:
      type: string
      enum:
        - LOCAL
        - DEV
        - QA
        - PROD
      title: ServerType
    CallType:
      type: string
      enum:
        - INCOMING
        - OUTGOING
      title: CallType
    ProviderType:
      type: string
      enum:
        - EXOTEL
        - PLIVO_CX
        - PLIVO_L
      title: ProviderType
      description: Telephony provider types for call agents.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````