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

# Configure an AI agent

> Update an agent's name, greeting, system prompt, voice, language, or enabled state. Changes are synced to the voice runtime so the next call uses them. Send only the fields you want to change.



## OpenAPI

````yaml /openapi.json patch /v1/agents/{id}
openapi: 3.1.0
info:
  title: RevDesk v1 API
  version: 1.0.0
  description: >-
    Programmatic access to the RevDesk voice platform — calls, numbers, caller
    trust, and brands.
  contact:
    name: RevDesk
    email: support@revdesk.com
servers:
  - url: https://api.revdesk.com
security:
  - bearerAuth: []
tags:
  - name: Phone Numbers
  - name: Caller IDs
  - name: Enterprise Registration
  - name: Branded Calling
  - name: Calls
  - name: SMS
  - name: WebRTC
  - name: Reputation
  - name: Usage
  - name: Account
  - name: Agents
  - name: Documents
  - name: Sub-entities
paths:
  /v1/agents/{id}:
    patch:
      tags:
        - Agents
      summary: Configure an AI agent
      description: >-
        Update an agent's name, greeting, system prompt, voice, language, or
        enabled state. Changes are synced to the voice runtime so the next call
        uses them. Send only the fields you want to change.
      operationId: v1_agents_id_patch
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            UUID — when present, deduplicates repeat submissions. See
            /api-reference/idempotency.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: http://json-schema.org/draft-07/schema#
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                enabled:
                  type: boolean
                greeting:
                  anyOf:
                    - type: string
                      maxLength: 1000
                    - type: 'null'
                system_prompt:
                  anyOf:
                    - type: string
                      maxLength: 20000
                    - type: 'null'
                voice_id:
                  type: string
                  minLength: 1
                language:
                  type: string
                  minLength: 2
                  maxLength: 10
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $schema: http://json-schema.org/draft-07/schema#
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      name:
                        type: string
                      enabled:
                        type: boolean
                      agent_type:
                        type: string
                        enum:
                          - inbound
                          - outbound
                          - both
                          - unassigned
                      greeting:
                        anyOf:
                          - type: string
                          - type: 'null'
                      language:
                        anyOf:
                          - type: string
                          - type: 'null'
                      voice_id:
                        anyOf:
                          - type: string
                          - type: 'null'
                      business_name:
                        anyOf:
                          - type: string
                          - type: 'null'
                      business_description:
                        anyOf:
                          - type: string
                          - type: 'null'
                      system_prompt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      phone_number:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: number
                              phone_number:
                                type: string
                              provider:
                                type: string
                              is_active:
                                type: boolean
                            required:
                              - id
                              - phone_number
                              - provider
                              - is_active
                            additionalProperties: false
                          - type: 'null'
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                      - id
                      - name
                      - enabled
                      - agent_type
                      - greeting
                      - language
                      - voice_id
                      - business_name
                      - business_description
                      - system_prompt
                      - phone_number
                      - created_at
                      - updated_at
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Conflict (incl. idempotency conflicts)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            fields:
              type: object
              additionalProperties:
                type: string
            doc_url:
              type: string
              format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````