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

# Update agent

> Update an existing agent with a new configuration. You can update any of the agent's properties including name, language, voice settings, and states. The update will generate a new version of the latest draft configuration of the agent. The response includes headers about rate limiting.



## OpenAPI

````yaml /api-reference-v1/openapi.json patch /v1/agents/{agent_id}
openapi: 3.1.0
info:
  title: Rounded API
  description: Rounded API
  version: 1.0.0
servers:
  - url: https://api.callrounded.com
security:
  - ApiKeyHeader: []
paths:
  /v1/agents/{agent_id}:
    patch:
      tags:
        - agents
      summary: Update agent
      description: >-
        Update an existing agent with a new configuration. You can update any of
        the agent's properties including name, language, voice settings, and
        states. The update will generate a new version of the latest draft
        configuration of the agent. The response includes headers about rate
        limiting.
      operationId: update_agent_v1_agents__agent_id__patch
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The ID of the agent to update.
            title: Agent Id
          description: The ID of the agent to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdateApiRequest'
              description: >-
                The agent data to update and generate a new configuration
                version. Some properties updates won't generate a new version as
                they are global settings and have immediate effect without
                requiring a deployment. These properties are:

                - `name`

                - `webhook_url`

                - `webhook_subscriptions`

                - `secure_recording_urls`


                For other properties, a new version will be created and
                available to be deployed.

                Properties definitions are the same as the agent create request,
                see [POST /v1/agents](/api-reference/agents/create-agent) for
                the complete schema definition. The response includes headers
                about rate limiting.
      responses:
        '200':
          description: Successfully updated agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentUpdateApiResponse-Input'
          headers:
            ratelimit-limit:
              description: The number of requests allowed in the current rate limit period
              schema:
                type: integer
            ratelimit-remaining:
              description: >-
                The number of requests remaining in the current rate limit
                period
              schema:
                type: integer
            x-ratelimit-limit-minute:
              description: >-
                The number of requests allowed in the current minute window, if
                rate limit is set to minutes.
              schema:
                type: integer
            x-ratelimit-remaining-minute:
              description: >-
                The number of requests remaining in the current minute window,
                if rate limit is set to minutes.
              schema:
                type: integer
            x-ratelimit-limit-hour:
              description: >-
                The number of requests allowed in the current hour window, if
                rate limit is set to hourly.
              schema:
                type: integer
            x-ratelimit-remaining-hour:
              description: >-
                The number of requests remaining in the current hour window, if
                rate limit is set to hourly.
              schema:
                type: integer
            x-ratelimit-limit-<seconds>:
              description: >-
                The number of requests allowed in the current <seconds> window,
                where <seconds> is the number of seconds, if rate limit is set
                to seconds.
              schema:
                type: integer
            x-ratelimit-remaining-<seconds>:
              description: >-
                The number of requests remaining in the current <seconds>
                window, where <seconds> is the number of seconds, if rate limit
                is set to seconds.
              schema:
                type: integer
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Bad request
                  type: api_error
                  status: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              examples:
                auth_error:
                  summary: Error from the API Service
                  value:
                    message: Unauthorized
                    type: auth_error
                    status: 401
                gateway_error:
                  summary: Error from the API Gateway
                  value:
                    message: Unauthorized
                    type: gateway_auth_error
                    status: 401
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Access forbidden
                  type: api_error
                  status: 403
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: The request endpoint does not exist
                  type: http_error
                  status: 404
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Invalid request body
                  type: validation_error
                  status: 422
                  details:
                    - field: email
                      message: Invalid email format
        '429':
          description: Rate Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: API rate limit exceeded
                  type: gateway_rate_limit_error
                  status: 429
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: An unexpected error occurred
                  type: generic_error
                  status: 500
components:
  schemas:
    AgentUpdateApiRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        language:
          anyOf:
            - type: string
              enum:
                - en
                - fr
                - fr-FR
                - fr-BE
                - fr-CA
                - es
                - de
                - it
                - nl
                - pl
                - ar
                - pt
                - el
                - hr
                - zh
            - type: 'null'
          title: Language
        initial_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Initial Message
        initial_message_delay:
          anyOf:
            - type: number
            - type: 'null'
          title: Initial Message Delay
        max_call_duration:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Call Duration
        presence_check_phrases:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Presence Check Phrases
        presence_check_idle_threshold:
          anyOf:
            - type: integer
            - type: 'null'
          title: Presence Check Idle Threshold
        presence_check_max_times:
          anyOf:
            - type: integer
            - type: 'null'
          title: Presence Check Max Times
        base_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Base Prompt
        voice:
          anyOf:
            - oneOf:
                - $ref: >-
                    #/components/schemas/AgentCreateOpenAIVoiceConfigurationApiRequest
                - $ref: >-
                    #/components/schemas/AgentCreateElevenLabsVoiceConfigurationApiRequest
                - $ref: >-
                    #/components/schemas/AgentCreateCartesiaVoiceConfigurationApiRequest
                - $ref: >-
                    #/components/schemas/AgentCreateAzureVoiceConfigurationApiRequest
                - $ref: >-
                    #/components/schemas/AgentCreateGoogleVoiceConfigurationApiRequest
            - type: 'null'
          title: Voice
        states:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentCreateStatesApiRequest-Input'
              type: array
            - type: 'null'
          title: States
        initial_state_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Initial State Name
        llm:
          anyOf:
            - $ref: '#/components/schemas/AgentCreateLLMConfigurationApiRequest'
            - type: 'null'
        transcriber:
          anyOf:
            - $ref: >-
                #/components/schemas/AgentCreateTranscriberConfigurationApiRequest
            - type: 'null'
        secure_recording_urls:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Secure Recording Urls
        interruptions:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Interruptions
        interruptions_sensitivity:
          anyOf:
            - $ref: '#/components/schemas/InterruptSensitivity'
            - type: 'null'
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
        webhook_subscriptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentCreateWebhookSubscriptionsApiRequest'
              type: array
            - type: 'null'
          title: Webhook Subscriptions
        custom_vocabulary:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Custom Vocabulary
      type: object
      title: AgentUpdateApiRequest
    AgentUpdateApiResponse-Input:
      properties:
        message:
          type: string
          title: Message
          description: >-
            Response message indicating the result of the operation. It will be
            different depending on the update type (when a new version is
            created or not).
          default: Agent updated successfully
          examples:
            - >-
              Agent draft configuration updated to version 2. Deploy it to make
              it active.
            - Agent global settings updated successfully.
        data:
          $ref: '#/components/schemas/AgentGetApiResponseData-Input'
          description: The agent data retrieved after the update.
        error:
          anyOf:
            - $ref: '#/components/schemas/ApiResponseError'
            - type: 'null'
        status:
          type: integer
          title: Status
          description: HTTP status code of the response.
          default: 200
      type: object
      required:
        - data
      title: AgentUpdateApiResponse
    ApiResponseError:
      properties:
        message:
          type: string
          title: Message
        type:
          type: string
          title: Type
        status:
          type: integer
          title: Status
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ApiResponseErrorDetail'
              type: array
            - type: 'null'
          title: Details
      type: object
      required:
        - message
        - type
        - status
      title: ApiResponseError
      example:
        details:
          - field: email
            message: Invalid email format
        message: An error occurred while processing your request
        status: 400
        type: generic_error
    AgentCreateOpenAIVoiceConfigurationApiRequest:
      properties:
        provider:
          type: string
          enum:
            - elevenlabs
            - azure
            - cartesia
            - openai
            - google
            - gradium
          title: Provider
          default: openai
        name:
          type: string
          enum:
            - Alloy
            - Ash
            - Ballad
            - Coral
            - Echo
            - Fable
            - Onyx
            - Nova
            - Sage
            - Shimmer
            - Verse
            - Custom
          title: Name
          description: The voice of the agent
          examples:
            - Clara
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
          description: The instructions for the voice
          examples:
            - Warm, empathetic, friendly
        speed:
          type: number
          maximum: 4
          minimum: 0
          title: Speed
          description: The speed of the voice
          default: 1
          examples:
            - 0.5
            - 1
      type: object
      required:
        - name
      title: AgentCreateOpenAIVoiceConfigurationApiRequest
    AgentCreateElevenLabsVoiceConfigurationApiRequest:
      properties:
        provider:
          type: string
          enum:
            - elevenlabs
            - azure
            - cartesia
            - openai
            - google
            - gradium
          title: Provider
          default: elevenlabs
        name:
          type: string
          enum:
            - Anna
            - Guillaume
            - Adrien
            - Claire
            - Audrey
            - Lucie
            - Elli
            - Linda
            - Antonio
            - Martin
            - Sara
            - Susi
            - Ben
            - Aiden
            - Bill
            - Juniper
            - Cassidy
            - Finn
            - Nichalia
            - Hope
            - Jamahal
            - Julien
            - Mark
            - Brittney
            - Alex
            - Robert
            - Ruth
            - Melanie
            - Mark (AR)
            - Salma
            - Gulab
            - Anika
            - Agatha
            - Robert (PL)
            - Carla
            - Grandpa
            - Olivier
            - Rafiki
            - Jessy
            - Nicolas animateur
            - Nicolas Petit
            - Carolina
            - Susi ES
            - Carolina Ruiz
            - Edouard
            - Matthias
            - Emma
            - AudIA
            - Daphne
            - Nova
            - Celia Iso
            - Yass eleven
            - Marcel
            - Orion
            - Fabien calme
            - Corentin
            - Jeanne Canada
            - Patrick Quebec
            - Paulo
            - Marcel - French touch
            - Thibault Be
            - Stan the man
            - Maria - European Portuguese
            - Nic
            - Custom
          title: Name
          description: The voice of the agent
          examples:
            - Clara
        stability:
          type: number
          maximum: 1
          minimum: 0
          title: Stability
          description: The stability of the voice
          default: 0.5
          examples:
            - 0.5
            - 1
        similarity_boost:
          type: number
          maximum: 1
          minimum: 0
          title: Similarity Boost
          description: The similarity boost of the voice
          default: 0.5
          examples:
            - 0.5
            - 1
        speed:
          type: number
          maximum: 1.2
          minimum: 0
          title: Speed
          description: The speed of the voice
          default: 1
          examples:
            - 0.5
            - 1
      type: object
      required:
        - name
      title: AgentCreateElevenLabsVoiceConfigurationApiRequest
    AgentCreateCartesiaVoiceConfigurationApiRequest:
      properties:
        provider:
          type: string
          enum:
            - elevenlabs
            - azure
            - cartesia
            - openai
            - google
            - gradium
          title: Provider
          default: cartesia
        name:
          type: string
          enum:
            - Clara
            - Clara (turbo)
            - Christelle
            - Christelle (turbo)
            - Stern French Man
            - Moundir
            - Naou
            - Paul Iso
            - Melanie
            - Ines
            - Juan
            - Elena
            - Liv
            - Luca
            - Marco
            - Francesca
            - Savannah
            - Brooke C
            - Carson
            - David C
            - Prince ZH
            - Lisa ZH
            - Liu ZH
            - Custom
          title: Name
          description: The voice of the agent
          examples:
            - Clara
        speed:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Speed
          description: The speed of the voice
          default: 0.1
          examples:
            - 0.5
            - 1
      type: object
      required:
        - name
      title: AgentCreateCartesiaVoiceConfigurationApiRequest
    AgentCreateAzureVoiceConfigurationApiRequest:
      properties:
        provider:
          type: string
          enum:
            - elevenlabs
            - azure
            - cartesia
            - openai
            - google
            - gradium
          title: Provider
          default: azure
        name:
          type: string
          enum:
            - Steffan
            - Yvette
            - Custom
          title: Name
          description: The voice of the agent
          examples:
            - Clara
      type: object
      required:
        - name
      title: AgentCreateAzureVoiceConfigurationApiRequest
    AgentCreateGoogleVoiceConfigurationApiRequest:
      properties:
        provider:
          type: string
          enum:
            - elevenlabs
            - azure
            - cartesia
            - openai
            - google
            - gradium
          title: Provider
          default: google
        name:
          type: string
          enum:
            - Aoede
            - Charon
            - Fenrir
            - Kore
            - Leda
            - Orus
            - Puck
            - Zephyr
            - Custom
          title: Name
          description: The voice of the agent
          examples:
            - Aoede
      type: object
      required:
        - name
      title: AgentCreateGoogleVoiceConfigurationApiRequest
    AgentCreateStatesApiRequest-Input:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: >-
            The name of the state, it should be unique within the agent, it will
            be used to identify the state in the conversation flow and to be
            referenced in the `transitions` array of other origin states.
          examples:
            - appointment_booking
            - movie_booking
            - customer_support
        prompt:
          type: string
          maxLength: 100000
          title: Prompt
          description: >-
            The prompt that will be sent to the LLM when the conversation flow
            reaches this state. This should contain instructions about what the
            agent should say and how it should behave in this particular state
            of the conversation. This can include references to variables (using
            the variable name) defined in any of the other states in their
            `variables` section.This can include references to the `tools`
            (using the tool name) that this state can use, listed in its `tools`
            array
          examples:
            - You are a helpful assistant
            - Ask the user for their name
            - If the user says 'hello', say 'Hello! How can I help you today?'
            - >-
              If the user says 'goodbye', finish the conversation using the tool
              `hang_up`
            - >-
              If the user says 'transfer', transfer the call to the tool
              `transfer_call`
            - >-
              If the user says 'leave a message', use the tool
              `leave_voicemail_message` to record a message
            - If the user says 'wait', use the tool `wait` to wait for 2 seconds
            - Get the list of movies from the `movies` variable
            - >-
              Search in the API the list of movies by using the `search_movies`
              cunstom function tool
        llm:
          anyOf:
            - $ref: '#/components/schemas/AgentCreateLLMConfigurationApiRequest'
            - type: 'null'
          description: >-
            The configuration of the LLM that will be used to generate the
            prompt for this state. Don't modify it for now.
        tools:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/WaitToolCreateApiRequest'
                  - $ref: '#/components/schemas/HangUpToolCreateApiRequest'
                  - $ref: '#/components/schemas/TransferCallToolCreateApiRequest'
                  - $ref: >-
                      #/components/schemas/LeaveVoicemailMessageToolCreateApiRequest
                  - $ref: >-
                      #/components/schemas/CustomFunctionToolCreateApiRequest-Input
              type: array
            - type: 'null'
          title: Tools
          description: >-
            The tools that this state can use to perform actions, available
            tools are: - `wait`: Wait for a specified amount of time- `hang_up`:
            Hang up the call- `transfer_call`: Transfer the call to a specified
            phone number- `leave_voicemail_message`: Leave a voicemail message-
            `custom_function`: Call a custom function
          examples:
            - - description: Wait for 2 seconds
                type: wait
              - description: Hang up the call
                filler_sentence: Goodbye!
                type: hang_up
              - description: Transfer the call to the next available assistant
                filler_sentence: I'm transferring you to the next available assistant...
                type: transfer_call
              - description: Leave a voicemail message
                filler_sentence: >-
                  I tried to call you but you didn't answer. Please call me back
                  at 1234567890
                type: leave_voicemail_message
              - content_type: url_params
                description: >-
                  Get the availability of the requested assistant by using its
                  name
                filler_sentence: I'm checking the availability of the requested assistant...
                headers:
                  - description: The API key to use to call the custom function
                    name: Authorization
                    value: Bearer 123
                method: GET
                parameters:
                  - description: The name of the assistant to check the availability of
                    name: assistant_name
                    type: string
                response_mapping:
                  - destination_variable: assistant_availability
                    json_path_to_data: $.availability
                type: custom_function
                url: https://api.example.com/availability
        transitions:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentCreateStateTransitionsApiRequest'
              type: array
            - type: 'null'
          title: Transitions
          description: >-
            The transitions to which this state can transition to, shaping the
            conversation flow
          examples:
            - - condition: User provides valid input
                destination_state_name: next_state_name
                filler_sentence: I'm sorry, I didn't catch that. Can you please repeat?
        variables:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentCreateStateVariablesApiRequest'
              type: array
            - type: 'null'
          title: Variables
          description: >-
            The variables that this state will extract from its conversation,
            they will be available to the next states
          examples:
            - - description: The variable's description
                extraction_instructions: The instructions for the variable extraction
                name: variable_name
                type: string
        x_position:
          anyOf:
            - type: number
            - type: 'null'
          title: X Position
          description: The x position of the state in the conversation flow
          examples:
            - -401.1747211895911
        y_position:
          anyOf:
            - type: number
            - type: 'null'
          title: Y Position
          description: The y position of the state in the conversation flow
          examples:
            - 264.2527881040892
        features:
          anyOf:
            - type: object
            - type: 'null'
          title: Features
          description: The features of the state
          examples:
            - entity_detection: true
      type: object
      required:
        - name
        - prompt
      title: AgentCreateStatesApiRequest
    AgentCreateLLMConfigurationApiRequest:
      properties:
        model:
          $ref: '#/components/schemas/ModelType'
          description: The model of the LLM
          examples:
            - gpt-4o
        temperature:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Temperature
          description: >-
            The temperature of the LLM. For OpenAI's GPT-5 models, the
            temperature is not supported and overriden to 1.
          default: 0.5
          examples:
            - 0.5
        provider:
          anyOf:
            - $ref: '#/components/schemas/LLMProvider'
            - type: 'null'
          description: The provider of the LLM
          examples:
            - azure_openai
            - mistral
            - google
      type: object
      required:
        - model
      title: AgentCreateLLMConfigurationApiRequest
    AgentCreateTranscriberConfigurationApiRequest:
      properties:
        provider:
          type: string
          enum:
            - elevenlabs
            - azure
            - cartesia
            - openai
            - google
            - gradium
          maxLength: 100
          minLength: 1
          title: Provider
          description: The provider of the transcriber
          default: azure
          examples:
            - azure
            - gladia
            - deepgram
      type: object
      title: AgentCreateTranscriberConfigurationApiRequest
    InterruptSensitivity:
      type: string
      enum:
        - high
        - medium
        - low
      title: InterruptSensitivity
    AgentCreateWebhookSubscriptionsApiRequest:
      type: string
      enum:
        - event_variable_value_updated
        - event_all_variables_resolved
        - event_call_status_updated
        - event_call_recording_status_updated
        - event_call_answer_type_updated
        - event_task_transition
        - event_transcript
        - event_transcript_complete
        - event_phone_call_connected
        - event_phone_call_ended
        - event_phone_call_did_not_connect
        - event_web_call_connected
        - event_web_call_ended
        - event_recording
        - event_action
        - event_synthesizer_consumption
        - event_post_call
        - event_pipedream_connection
      title: AgentCreateWebhookSubscriptionsApiRequest
    AgentGetApiResponseData-Input:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: The name of the agent
          examples:
            - My first agent
        language:
          type: string
          enum:
            - en
            - fr
            - fr-FR
            - fr-BE
            - fr-CA
            - es
            - de
            - it
            - nl
            - pl
            - ar
            - pt
            - el
            - hr
            - zh
          title: Language
          description: >-
            The language of the agent, expressed as a BCP 47 language tag by
            using its ISO 639-1 code (e.g. 'en', 'fr', 'es'). For French,
            regional variants using a region code from ISO 3166-1 are also
            supported (e.g. 'fr-BE').
          examples:
            - en
            - fr
            - fr-BE
            - es
        initial_message:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Initial Message
          description: The initial message of the agent
          default: Bonjour ! Que puis-je faire pour vous ?
          examples:
            - Hello, how can I help you today?
        initial_message_delay:
          anyOf:
            - type: number
              maximum: 5
              minimum: 0
            - type: 'null'
          title: Initial Message Delay
          description: The delay of the initial message in seconds
          default: 0
          examples:
            - 0
        max_call_duration:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Call Duration
          description: The maximum duration of the call in seconds
          default: 1800
          examples:
            - 300
        presence_check_phrases:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Presence Check Phrases
          description: >-
            A series of phrases that the agent will say to re-engage the
            interlocutor after a period of silence. The phrases should be in the
            same language as the agent.
          default:
            - Allo, vous êtes là ?
            - Pouvez-vous répéter s'il vous plaît ?
          examples:
            - - Allo, vous êtes là ?
              - Pouvez-vous répéter s'il vous plaît ?
        presence_check_idle_threshold:
          anyOf:
            - type: integer
              maximum: 120
              minimum: 3
            - type: 'null'
          title: Presence Check Idle Threshold
          description: >-
            The number of seconds of silence after which the agent will say the
            presence check phrases
          default: 15
          examples:
            - 10
        presence_check_max_times:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 1
            - type: 'null'
          title: Presence Check Max Times
          description: >-
            The maximum number of times the agent will say the presence check
            phrases
          default: 10
          examples:
            - 1
        base_prompt:
          anyOf:
            - type: string
              maxLength: 100000
              minLength: 0
            - type: 'null'
          title: Base Prompt
          description: The base prompt of the agent
          examples:
            - You are a helpful assistant
        voice:
          anyOf:
            - oneOf:
                - $ref: >-
                    #/components/schemas/AgentCreateOpenAIVoiceConfigurationApiRequest
                - $ref: >-
                    #/components/schemas/AgentCreateElevenLabsVoiceConfigurationApiRequest
                - $ref: >-
                    #/components/schemas/AgentCreateCartesiaVoiceConfigurationApiRequest
                - $ref: >-
                    #/components/schemas/AgentCreateAzureVoiceConfigurationApiRequest
                - $ref: >-
                    #/components/schemas/AgentCreateGoogleVoiceConfigurationApiRequest
            - type: 'null'
          title: Voice
          description: The voice of the agent
        states:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentCreateStatesApiRequest-Input'
              type: array
            - type: 'null'
          title: States
        initial_state_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Initial State Name
        llm:
          anyOf:
            - $ref: '#/components/schemas/AgentCreateLLMConfigurationApiRequest'
            - type: 'null'
        transcriber:
          anyOf:
            - $ref: >-
                #/components/schemas/AgentCreateTranscriberConfigurationApiRequest
            - type: 'null'
        secure_recording_urls:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Secure Recording Urls
          description: Whether to secure the recording URLs
          default: true
          examples:
            - true
        interruptions:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Interruptions
          description: Whether to allow interruptions
          default: false
          examples:
            - true
        interruptions_sensitivity:
          anyOf:
            - $ref: '#/components/schemas/InterruptSensitivity'
            - type: 'null'
          description: The sensitivity of the interruptions
          default: high
          examples:
            - high
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: The webhook URL of the agent
          examples:
            - https://webhook.site/123e4567-e89b-12d3-a456-426614174000
        webhook_subscriptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentCreateWebhookSubscriptionsApiRequest'
              type: array
            - type: 'null'
          title: Webhook Subscriptions
          description: The webhook subscriptions of the agent
          default:
            - event_variable_value_updated
            - event_all_variables_resolved
            - event_call_status_updated
            - event_call_recording_status_updated
            - event_call_answer_type_updated
            - event_task_transition
            - event_transcript
            - event_transcript_complete
            - event_phone_call_connected
            - event_phone_call_ended
            - event_phone_call_did_not_connect
            - event_web_call_connected
            - event_web_call_ended
            - event_recording
            - event_action
            - event_synthesizer_consumption
            - event_post_call
            - event_pipedream_connection
          examples:
            - - event_variable_value_updated
              - event_all_variables_resolved
        custom_vocabulary:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Custom Vocabulary
          description: >-
            The custom vocabulary of the agent, used mainly to improve
            transcription accuracy.
          examples:
            - - super
              - basta
              - bravo
              - gmail.com
        id:
          type: string
          format: uuid
          title: Id
        version:
          type: integer
          title: Version
          default: 1
        variables:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentVariablesApiResponseData'
              type: array
            - type: 'null'
          title: Variables
      type: object
      required:
        - name
        - language
        - id
      title: AgentGetApiResponseData
    ApiResponseErrorDetail:
      properties:
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: ApiResponseErrorDetail
    WaitToolCreateApiRequest:
      properties:
        name:
          type: string
          title: Name
          description: >-
            The name of the wait tool, this will be used to be referenced in the
            state prompt.
          default: wait
        filler_sentence:
          anyOf:
            - type: string
              maxLength: 1000
              minLength: 0
            - type: 'null'
          title: Filler Sentence
          description: The filler sentence to be spoken while waiting
          default: ''
          examples:
            - Please hold while I connect you to the next available agent
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Description of what the wait tool does, this will be used by the LLM
            to understand what the wait tool does.
          default: Waits for the IVR to finish speaking or to continue waiting on hold
        type:
          type: string
          const: wait
          title: Type
          description: The type of tool - must be 'wait'
          default: wait
      type: object
      title: WaitToolCreateApiRequest
    HangUpToolCreateApiRequest:
      properties:
        name:
          type: string
          title: Name
          description: >-
            The name of the hang up tool, this will be used to be referenced in
            the state prompt.
          default: hang_up
        filler_sentence:
          anyOf:
            - type: string
            - type: 'null'
          title: Filler Sentence
          description: >-
            The filler sentence to be spoken while hanging up, this will be used
            by the LLM to understand what the hang up tool does.
          default: Good-bye!
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Description of what the hang up tool does, this will be used by the
            LLM to understand what the hang up tool does.
          default: Terminate the call
        type:
          type: string
          const: hang_up
          title: Type
          description: The type of tool - must be 'hang_up'
          default: hang_up
      type: object
      title: HangUpToolCreateApiRequest
    TransferCallToolCreateApiRequest:
      properties:
        name:
          type: string
          title: Name
          description: >-
            The name of the transfer call tool, this will be used to be
            referenced in the state prompt.
          default: transfer_call
        filler_sentence:
          anyOf:
            - type: string
            - type: 'null'
          title: Filler Sentence
          description: >-
            The filler sentence to be spoken while transferring the call, this
            will be used by the LLM to understand what the transfer call tool
            does.
          default: One moment, I'll transfer you
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Description of what the transfer call tool does, this will be used
            by the LLM to understand what the transfer call tool does.
          default: Default redirect
        type:
          type: string
          const: transfer_call
          title: Type
          description: The type of tool - must be 'transfer_call'
          default: transfer_call
        phone_number:
          type: string
          title: Phone Number
          description: The phone number to transfer the call to
        transfer_hours:
          anyOf:
            - $ref: >-
                #/components/schemas/TransferCallToolTransferHoursCreateApiRequest
            - type: 'null'
          description: >-
            The transfer hours to allow the transfer of the call to the phone
            number
      type: object
      required:
        - phone_number
      title: TransferCallToolCreateApiRequest
    LeaveVoicemailMessageToolCreateApiRequest:
      properties:
        name:
          type: string
          title: Name
          description: >-
            The name of the leave voicemail message tool, this will be used to
            be referenced in the state prompt.
          default: leave_voicemail_message
        filler_sentence:
          type: string
          title: Filler Sentence
          description: The actual message to leave as a voicemail message.
          default: >-
            Hello, I tried to call you but you didn't pick up. Please call me
            back.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Description of what the leave voicemail message tool does, this will
            be used by the LLM to understand what the leave voicemail message
            tool does.
          default: >-
            Leave a message if the person is unavailable and their voicemail
            picks up
        type:
          type: string
          const: leave_voicemail_message
          title: Type
          description: The type of tool - must be 'leave_voicemail_message'
          default: leave_voicemail_message
      type: object
      title: LeaveVoicemailMessageToolCreateApiRequest
    CustomFunctionToolCreateApiRequest-Input:
      properties:
        name:
          type: string
          title: Name
          description: >-
            The name of the custom function tool, this will be used to be
            referenced in the state prompt.
          default: custom_function
        filler_sentence:
          anyOf:
            - type: string
            - type: 'null'
          title: Filler Sentence
          description: >-
            The filler sentence to be spoken while the custom function tool is
            being executed, this will be used by the LLM to understand what the
            custom function tool does.
          default: Custom function
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Description of what the custom function tool does, this will be used
            by the LLM to understand what the custom function tool does.
          default: Custom function
        type:
          type: string
          const: custom_function
          title: Type
          description: The type of tool - must be 'custom_function'
          default: custom_function
        url:
          type: string
          title: Url
          description: The URL to call
        method:
          type: string
          title: Method
          description: The HTTP method to use
        content_type:
          type: string
          title: Content Type
          description: The content type of the request
          default: json
        headers:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/CustomFunctionHeaderCreateApiRequest-Input
              type: array
            - type: 'null'
          title: Headers
          description: The headers to send with the request
        parameters:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/CustomFunctionParameterCreateApiRequest-Input
              type: array
            - type: 'null'
          title: Parameters
          description: The parameters to send with the request
        response_mapping:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/CustomFunctionResponseMappingCreateApiRequest
              type: array
            - type: 'null'
          title: Response Mapping
          description: Mapping of response fields to variables
      type: object
      required:
        - url
        - method
      title: CustomFunctionToolCreateApiRequest
    AgentCreateStateTransitionsApiRequest:
      properties:
        destination_state_name:
          type: string
          title: Destination State Name
        condition:
          anyOf:
            - type: string
              maxLength: 100000
            - type: 'null'
          title: Condition
          description: The condition of the transition
          default: ''
          examples:
            - The caller is happy
        filler_sentence:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Filler Sentence
          description: The filler sentence of the transition
          examples:
            - ''
      type: object
      required:
        - destination_state_name
      title: AgentCreateStateTransitionsApiRequest
    AgentCreateStateVariablesApiRequest:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: The name of the variable
          examples:
            - name
        type:
          type: string
          enum:
            - string
            - boolean
            - number
            - datetime
          title: Type
          description: The type of the variable
          examples:
            - string
            - boolean
            - number
            - datetime
        extraction_instructions:
          anyOf:
            - type: string
              maxLength: 100000
            - type: 'null'
          title: Extraction Instructions
          description: The instructions for the variable extraction
          examples:
            - Extract the name of the customer
      type: object
      required:
        - name
        - type
      title: AgentCreateStateVariablesApiRequest
    ModelType:
      type: string
      enum:
        - gpt-3.5-turbo
        - gpt-4
        - gpt-4o
        - gpt-4o-mini
        - gpt-4.1
        - gpt-4.1-mini
        - gpt-4.1-nano
        - gpt-5
        - gpt-5-mini
        - gpt-5-nano
        - gemini-1.5-flash
        - gemini-2.0-flash
        - gemini-2.0-flash-lite
        - gemini-2.5-flash
        - gemini-2.5-flash-lite
        - gemini-2.5-pro
        - mistral-large-latest
        - mistral-small-latest
      title: ModelType
    LLMProvider:
      type: string
      enum:
        - openai
        - azure_openai
        - mistral
        - deepseek
        - google
        - meta
        - anthropic
      title: LLMProvider
    AgentVariablesApiResponseData:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: The name of the variable
          examples:
            - name
        type:
          type: string
          maxLength: 100
          minLength: 1
          title: Type
          description: The type of the variable
          examples:
            - string
        description:
          anyOf:
            - type: string
              maxLength: 100000
              minLength: 0
            - type: 'null'
          title: Description
          description: The description of the variable
          examples:
            - The name of the customer
        extraction_instructions:
          anyOf:
            - type: string
              maxLength: 100000
            - type: 'null'
          title: Extraction Instructions
          description: The extraction instructions of the variable
          examples:
            - Extract the name of the customer
      type: object
      required:
        - name
        - type
      title: AgentVariablesApiResponseData
    TransferCallToolTransferHoursCreateApiRequest:
      properties:
        source_variable:
          type: string
          title: Source Variable
          description: The JSON variable where to get the allowed transfer hours
        hang_up_outside_transfer_hours:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hang Up Outside Transfer Hours
          description: Whether to hang up the call outside of transfer hours
          default: false
        hang_up_filler_sentence:
          anyOf:
            - type: string
              maxLength: 1000
              minLength: 0
            - type: 'null'
          title: Hang Up Filler Sentence
          description: The filler sentence to be spoken while hanging up
          default: ''
        outside_hours_instructions:
          anyOf:
            - type: string
              maxLength: 2000
              minLength: 0
            - type: 'null'
          title: Outside Hours Instructions
          description: >-
            Instructions for the LLM when transfer is attempted outside of
            opening hours (only used when hang_up_outside_transfer_hours is
            false)
      type: object
      required:
        - source_variable
      title: TransferCallToolTransferHoursCreateApiRequest
    CustomFunctionHeaderCreateApiRequest-Input:
      properties:
        name:
          type: string
          title: Name
        value:
          $ref: '#/components/schemas/CustomFunctionParameterValueApiRequest'
      type: object
      required:
        - name
        - value
      title: CustomFunctionHeaderCreateApiRequest
    CustomFunctionParameterCreateApiRequest-Input:
      properties:
        name:
          type: string
          title: Name
        value:
          $ref: '#/components/schemas/CustomFunctionParameterValueApiRequest'
      type: object
      required:
        - name
        - value
      title: CustomFunctionParameterCreateApiRequest
    CustomFunctionResponseMappingCreateApiRequest:
      properties:
        json_path_to_data:
          type: string
          title: Json Path To Data
          description: JSONPath expression to extract data
        destination_variable:
          type: string
          title: Destination Variable
          description: Variable name to store the extracted data
      type: object
      required:
        - json_path_to_data
        - destination_variable
      title: CustomFunctionResponseMappingCreateApiRequest
    CustomFunctionParameterValueApiRequest:
      properties:
        source:
          type: string
          enum:
            - variable
            - constant
            - llm_parameter
          title: Source
        variable:
          anyOf:
            - type: string
            - type: 'null'
          title: Variable
        constant:
          anyOf:
            - type: string
            - type: 'null'
          title: Constant
        llm_parameter:
          anyOf:
            - $ref: '#/components/schemas/CustomFunctionLLMParameterApiRequest'
            - type: 'null'
      type: object
      required:
        - source
      title: CustomFunctionParameterValueApiRequest
    CustomFunctionLLMParameterApiRequest:
      properties:
        name:
          type: string
          title: Name
          description: The name of the parameter
        type:
          type: string
          enum:
            - string
            - boolean
            - number
            - json
          title: Type
          description: The type of the parameter
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of what the parameter is for
          default: ''
        optional:
          type: boolean
          title: Optional
          description: Whether this parameter is optional
          default: false
      type: object
      required:
        - name
        - type
      title: CustomFunctionLLMParameterApiRequest
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        The API Key created in [Rounded Studio](https://app.callrounded.com).

        - You can create it by going to the "API Keys" settings of your profile.

        - Need help? You can email us at
        [team@callrounded.com](mailto:team@callrounded.com) or join our [Discord
        community](https://discord.gg/en537j5z75).

````