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

# Edit Assistant

> Updates an existing assistant with new configuration settings. Each operation requires specific fields to be provided.

Update an existing assistant. The request uses an `operation` field so each edit is explicit, such as updating prompts, variables, or webhook event subscriptions.

## When to use

* Update assistant configuration from your own admin backend.
* Configure event subscriptions for webhooks.
* Keep assistant behavior synchronized with templates in your product.

## Integration notes

* Test configuration changes with one individual call before running a campaign.
* Avoid overwriting unrelated assistant settings in broad update flows.
* For webhook setup, use `operation: "edit_event_subscriptions"` and provide the events plus callback URL Ringg should call.

## Related guide

See [webhook setup](/webhooks/initial-setup) for a complete event subscription example.


## OpenAPI

````yaml patch /agent/v1
openapi: 3.0.0
info:
  title: Ringg AI API Documentation
  description: >-
    This is the documentation for the Ringg AI APIs. The Ringg AI API follows
    RESTful principles, making it intuitive and easy to integrate with your
    applications. All API requests should be made to the base URL. The API
    accepts and returns data in JSON format. Ensure your requests include the
    appropriate Content-Type header for POST and PATCH requests.
  version: 2.0.0
servers:
  - url: https://prod-api.ringg.ai/ca/api/v0
security: []
tags:
  - name: workspace
    description: Endpoints for managing your workspace.
  - name: agent
    description: Endpoints for managing assistants (agents).
  - name: calling
    description: Endpoints for making and managing calls.
  - name: campaign
    description: Endpoints for managing campaigns.
  - name: analytics
    description: Endpoints for accessing call analytics and performance metrics.
  - name: termination
    description: Endpoints for terminating active calls using different methods.
  - name: knowledgebase
    description: Endpoints for managing knowledge bases.
paths:
  /agent/v1:
    patch:
      tags:
        - agent
      summary: Edit Assistant
      description: >-
        Updates an existing assistant with new configuration settings. Each
        operation requires specific fields to be provided.
      operationId: editAssistant
      parameters:
        - name: X-API-KEY
          in: header
          description: (Required) Your Ringg AI API key.
          required: true
          schema:
            type: string
            example: 7251cb4b-3373-43a4-844c-b27a1d45e0c9
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - operation
                - agent_id
              properties:
                operation:
                  type: string
                  enum:
                    - attach_inbound_number
                    - remove_inbound_number
                    - attach_kb
                    - remove_kb
                    - edit_custom_vars
                    - edit_language
                    - edit_voice
                    - edit_prompt
                    - edit_noise_settings
                    - edit_agent_display_name
                    - edit_intro_message
                    - edit_query_phrases
                    - edit_dtmf_settings
                    - edit_vad_settings
                    - edit_agent_whitelisted_domains
                    - edit_voice_speed
                    - edit_extract_callee_name
                    - edit_vocab
                    - edit_api_settings
                    - edit_secondary_language
                    - edit_secondary_voice
                  example: edit_agent_display_name
                agent_id:
                  type: string
                  example: 830f767a-397e-4b39-82ff-235cd344e2f9
                agent_display_name:
                  type: string
                  example: Updated Sales Assistant
                language:
                  type: string
                  enum:
                    - en-US
                    - en-IN
                    - hi-IN
                    - ta-IN
                    - te-IN
                    - kn-IN
                    - mr-IN
                    - gu-IN
                    - ar-AE
                  example: en-US
                voice_id:
                  type: string
                  example: 3b5c7d2a-8e9f-4a1b-9c6d-2e5f8a7b3c4d
                secondary_voice_id:
                  type: string
                  example: 4c6d8e3b-9f0a-5b2c-ad7e-3f6a9b8c5d7e
                secondary_language:
                  type: string
                  enum:
                    - en-US
                    - en-IN
                    - hi-IN
                    - ta-IN
                    - te-IN
                    - kn-IN
                    - mr-IN
                    - gu-IN
                    - ar-AE
                  example: hi-IN
                agent_prompt:
                  oneOf:
                    - type: string
                      example: You are a helpful sales assistant.
                    - type: object
                      properties:
                        prompt_sections:
                          type: array
                          items:
                            type: object
                            properties:
                              section_title:
                                type: string
                              section_content:
                                type: string
                custom_variables:
                  type: array
                  items:
                    type: string
                  example:
                    - callee_name
                    - mobile_number
                    - company
                    - lead_source
                number_id:
                  type: string
                  example: 5d7f9a2b-1c3e-4f6a-8b9c-0d1e2f3a4b5c
                kb_id:
                  type: string
                  example: 7a9c2d5e-4f6b-1a2b-3c4d-5e6f7a8b9c0d
                whitelisted_domains:
                  type: array
                  items:
                    type: string
                  example:
                    - https://www.ringg.ai
                    - https://example.com
                voice_speed:
                  type: number
                  example: 1.2
      responses:
        '200':
          description: 'Successful Response: Assistant updated successfully.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Agent updated successfully!
                  agent_id:
                    type: string
                    example: 830f767a-397e-4b39-82ff-235cd344e2f9
        '400':
          description: Bad Request - Invalid parameters or request format.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Selected voice does not support the specified language
        '401':
          description: Unauthorized - Invalid or missing API key.
        '404':
          description: Not Found - Assistant not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Agent not found
        '500':
          description: Internal Server Error - Something went wrong on our end.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Failed to edit agent

````