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

# Update Agent

> Partially updates an existing agent by agentId. Only fields provided in the request body are updated — omitted fields remain unchanged. Returns the updated agent record.



## OpenAPI

````yaml patch /v1/agents/{agentId}
openapi: 3.0.1
info:
  title: SigmaMind APIs
  description: OpenAPI documentation SigmaMind Agent Builder APIs
  version: '1.0'
servers:
  - url: https://api.sigmamind.ai
    description: SigmaMind AI Agent Builder APIs
security:
  - apiKeyAuth: []
tags:
  - name: Chats
    description: >-
      Endpoints for creating and managing text-based chat sessions with an
      agent. A session is started by specifying an agent and an opening message.
      Returns a chatId used in all subsequent get, update, completion, and
      end-session calls.
  - name: Calls
    description: >-
      Endpoints for creating and managing outbound phone calls. A call is
      initiated by specifying an agent, caller number, and destination number —
      dynamic variables can be included to personalise the agent's behaviour.
      Returns a callId used in all subsequent get and delete operations.
  - name: Phone Numbers
    description: >-
      Endpoints for managing phone numbers used in outbound and inbound calls.
      Supports purchasing a new number through SigmaMind or importing an
      existing number via SIP trunking (BYO). Each number can be assigned
      separate inbound and outbound agents.
  - name: Campaigns
    description: >-
      Endpoints for creating and managing outbound call campaigns. A campaign
      dials a CSV-uploaded contact list using a selected agent and caller
      number, with support for immediate or scheduled launch. Returns a
      campaignId used in all subsequent get, update, and delete operations.
  - name: Agents
    description: >-
      Endpoints for creating and managing single prompt agents. An agent is
      configured with a system prompt, voice settings, and optional tools.
      Returns an agentId used in all subsequent update, call, and simulation
      operations.
  - name: Integrations
    description: >-
      Endpoints for creating and managing third-party integrations (e.g.
      Shopify, Cal.com). An integration links your account to an external
      service and acts as the parent resource for auth credentials and API
      tools. Returns an integrationId used in all subsequent auth and tool
      operations.
  - name: Integration Auth
    description: >-
      Endpoints for managing authentication credentials for a third-party
      integration. Supports API Key, Basic, and Bearer token credential types —
      scoped to an integration and injected automatically by tools when
      executing. Returns an authId used in all subsequent get, update, and
      delete operations.
  - name: Integration Tools
    description: >-
      Endpoints for creating and managing API tools backed by a third-party
      integration. Each tool defines an HTTP endpoint, method, and parameter
      schema — scoped to an integration and using its stored auth credentials
      when executing. Returns a toolId used in all subsequent get, update,
      delete, and execute operations.
  - name: Webhooks
    description: >-
      Endpoints for registering and managing webhooks. A webhook delivers
      real-time event notifications via HTTP POST when selected events occur on
      a specific agent — each webhook is scoped to one agent and one or more
      event types. Payloads are signed with an HMAC secret — verify the
      signature on your server to confirm authenticity.
  - name: Test Cases
    description: >-
      Endpoints for creating and managing simulation test cases for an agent. A
      test case defines a conversation scenario — including user persona, goals,
      and expected behaviour — used to generate a synthetic conversation with
      the agent. Returns a testCaseId used in all subsequent get, update,
      delete, and batch-run operations.
  - name: Batch Runs
    description: >-
      Endpoints for creating and managing batch runs of simulation test cases. A
      batch run executes multiple test cases in parallel against a selected
      agent and aggregates the results for review. Returns a batchId used in all
      subsequent get and list test-run operations.
  - name: Test Runs
    description: >-
      Endpoints for retrieving test run results within a batch. Each test run
      represents a single test case execution within a batch run, identified by
      a jobId. Use batchId and agentId to scope results to the correct batch.
  - name: API Keys
    description: >-
      Endpoints for creating and managing API keys used to authenticate public
      API requests. Each key must be included in the X-API-Key request header.
      Returns a keyId used in all subsequent get, revoke, and delete operations.
  - name: QA Rules
    description: >-
      Endpoints for creating and managing quality assurance rules applied to
      agent conversations. A QA rule defines evaluation criteria used to
      automatically assess conversation quality. Returns a qaRuleId used in all
      subsequent get, update,  and delete operations.
  - name: QA Issues
    description: >-
      Endpoints for retrieving and managing quality assurance issues flagged
      across agent conversations. A QA issue is created with status 'Fail' when
      a conversation violates one or more QA rules — capturing the offending
      rule reference. It is created with status 'Success' when the conversation
      passes the evaluation criteria of QA rule(s). Returns a qaIssueId used in
      all subsequent get operations.
paths:
  /v1/agents/{agentId}:
    patch:
      tags:
        - Agents
      summary: Update Agent
      description: >-
        Partially updates an existing agent by agentId. Only fields provided in
        the request body are updated — omitted fields remain unchanged. Returns
        the updated agent record.
      operationId: updateSinglePromptAgent
      parameters:
        - name: agentId
          in: path
          description: Unique identifier of the agent to update.
          required: true
          schema:
            type: string
          example: agent_IqmljBh8eSEGAqKd
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAgentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Bad Request
                    message: Invalid request parameters
                    path: /v1/agents
                    status: 400
                    timestamp: '2026-05-05T10:06:46.023Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Unauthorized
                    message: X-API-Key is missing or invalid
                    path: /v1/agents
                    status: 401
                    timestamp: '2026-05-05T10:06:46.023Z'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Forbidden
                    message: Access denied for this resource
                    path: /v1/agents
                    status: 403
                    timestamp: '2026-05-05T10:06:46.023Z'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Not Found
                    message: The requested resource was not found
                    path: /v1/agents
                    status: 404
                    timestamp: '2026-05-05T10:06:46.023Z'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  value:
                    error: Internal Server Error
                    message: Unexpected server error
                    path: /v1/agents
                    status: 500
                    timestamp: '2026-05-05T10:06:46.023Z'
components:
  schemas:
    UpdateAgentRequest:
      type: object
      description: >-
        Request body for updating an existing single prompt agent, including its
        instructions, welcome message configuration, runtime settings, and
        available tools.
      properties:
        agentName:
          type: string
          description: >-
            Human-readable name of the agent used to identify it in the
            dashboard and APIs.
          example: Auralis
        instructions:
          type: string
          description: >-
            Core system prompt that defines the agent’s behavior, personality,
            tone, response style, goals, and task handling logic. These
            instructions guide how the agent interacts with users and responds
            during conversations.
          example: >-
            You are a helpful customer support assistant. Answer concisely and
            professionally.
        welcomeMessageType:
          type: string
          description: >-
            Determines how the agent’s welcome message is generated. Use
            'static' to send a fixed predefined message, or 'prompt' to
            dynamically generate the welcome message using AI instructions.
          example: static
          default: static
          enum:
            - static
            - prompt
        welcomeMessage:
          type: string
          description: >-
            The content of the welcome message. If 'welcomeMessageType' is
            'static', this contains the exact message shown to the user. If it
            is 'prompt', this contains the prompt used to generate the welcome
            message dynamically.
          example: Welcome to our service! How can I assist you today?
        agentSettings:
          $ref: '#/components/schemas/UpdateAgentSettingsRequest'
        tools:
          type: array
          items:
            $ref: '#/components/schemas/UpdateToolRequest'
    CreateAgentResponse:
      type: object
      properties:
        agentId:
          type: string
          description: Id of the agent.
          example: SPIlVscbB0kkXBvZ
        agentName:
          type: string
          description: >-
            Human-readable name of the agent used to identify it in the
            dashboard and APIs.
          example: Auralis
        instructions:
          type: string
          description: >-
            Core system prompt that defines the agent’s behavior, personality,
            tone, response style, goals, and task handling logic. These
            instructions guide how the agent interacts with users and responds
            during conversations.
          example: >-
            You are a helpful customer support assistant. Answer concisely and
            professionally.
        welcomeMessageType:
          type: string
          description: >-
            Determines how the agent’s welcome message is generated. Use
            'static' to send a fixed predefined message, or 'prompt' to
            dynamically generate the welcome message using AI instructions.
          example: static
          default: static
          enum:
            - static
            - prompt
        welcomeMessage:
          type: string
          description: >-
            The content of the welcome message. If 'welcomeMessageType' is
            'static', this contains the exact message shown to the user. If it
            is 'prompt', this contains the prompt used to generate the welcome
            message dynamically.
          example: Welcome to our service! How can I assist you today?
        agentSettings:
          $ref: '#/components/schemas/CreateAgentSettingsResponse'
        tools:
          type: array
          items:
            $ref: '#/components/schemas/CreateToolResponse'
    Error:
      type: object
      properties:
        timestamp:
          type: string
          description: Error timestamp in ISO format
          format: date-time
        status:
          type: integer
          description: HTTP status code
          example: 400
        error:
          type: string
          description: Error type or HTTP status message
          example: Bad Request
        message:
          type: string
          description: Detailed error message
          example: Email is required
        path:
          type: string
          description: Request path where error occurred
          example: /v1/users
        validationErrors:
          type: object
          description: Field validation errors (if any)
          example: |-
            {
              "email": "Email is required",
              "name": "Name is too short"
            }
      description: Standard error response
    UpdateAgentSettingsRequest:
      type: object
      properties:
        language:
          type: string
          description: The language your customers will primarily speak during calls.
          example: en_US
          default: en_US
          enum:
            - multi_nova3
            - multi_nova2
            - en
            - en_US
            - en_AU
            - en_GB
            - en_NZ
            - en_IN
            - hi
            - de
            - de_CH
            - nl
            - sv
            - sv_SE
            - da
            - da_DK
            - es
            - es_419
            - fr
            - fr_CA
            - pt
            - pt_BR
            - pt_PT
            - it
            - tr
            - 'no'
            - id
            - bg
            - ca
            - zh
            - zh_CN
            - zh_Hans
            - zh_TW
            - zh_Hant
            - zh_HK
            - cs
            - et
            - fi
            - nl_BE
            - el
            - hu
            - ja
            - ko
            - ko_KR
            - lv
            - lt
            - ms
            - pl
            - ro
            - ru
            - sk
            - th
            - th_TH
            - uk
            - vi
        aiStartsConversation:
          type: boolean
          description: >-
            If true the AI agent will initiate the conversation immediately when
            the call connects. If false the call will connect silently, waiting
            for the customer to speak first before the AI responds
          example: true
          default: true
        backgroundSound:
          type: string
          description: Add ambient background audio during the call.
          example: keyboard_typing
          default: none
          enum:
            - keyboard_typing
            - office_ambience
            - none
        globalPrompt:
          type: string
          description: >-
            A global system prompt that is applied to every conversation to
            define the agent’s overall behavior, tone, and constraints.
          example: >-
            You are a professional virtual assistant. Always respond politely
            and keep answers concise.
        remindersIntervalDuration:
          maximum: 60
          minimum: 10
          type: integer
          description: >-
            Interval (in seconds) after which a follow-up reminder is
            automatically sent if the user does not respond.
          format: int32
          example: 15
          default: 10
        remindersLimit:
          maximum: 10
          minimum: 0
          type: integer
          description: >-
            Maximum number of follow-up reminders to send when the user does not
            respond. Set to 0 to disable reminders.
          format: int32
          example: 3
          default: 4
        endCallOnSilenceDuration:
          maximum: 30
          exclusiveMaximum: false
          minimum: 0.1
          exclusiveMinimum: false
          type: number
          description: >-
            Specifies the duration of continuous silence (in minutes) after
            which the call will be automatically ended.
          format: float
          example: 30
          default: 5
        maxCallDuration:
          maximum: 120
          minimum: 1
          type: integer
          description: >-
            Maximum call duration (in minutes) before the call is automatically
            terminated.
          format: int32
          example: 40
          default: 60
        llmModel:
          type: string
          description: >-
            The language model that powers the AI's responses. To use OpenAI
            priority tier models, append '-fast-tier' to the model name (e.g.,
            'gpt-4o-mini-fast-tier').
          example: gpt-4o-mini
          default: gpt-4o-mini
          enum:
            - gpt-5.2
            - gpt-5.2-fast-tier
            - gpt-5.1
            - gpt-5.1-fast-tier
            - gpt-5
            - gpt-5-fast-tier
            - gpt-5-mini
            - gpt-5-mini-fast-tier
            - gpt-5-nano
            - gpt-4.1
            - gpt-4.1-fast-tier
            - gpt-4.1-mini
            - gpt-4.1-mini-fast-tier
            - gpt-4.1-nano
            - gpt-4.1-nano-fast-tier
            - gpt-4o
            - gpt-4o-fast-tier
            - gpt-4o-mini
            - gpt-4o-mini-fast-tier
            - claude-haiku-4-5-20251001
            - claude-sonnet-4-5-20250929
            - claude-sonnet-4-20250514
            - gemini-3.1-flash-lite-preview
            - gemini-3-flash-preview
            - gemini-2.5-flash-lite
            - gemini-2.5-flash
        llmTemperature:
          maximum: 1
          exclusiveMaximum: false
          minimum: 0
          exclusiveMinimum: false
          type: number
          description: >-
            Controls randomness in the model's output. Lower values make
            responses more deterministic; higher values make them more creative.
            If not provided, the default value is derived from the selected
            llmModel.
          format: double
          example: 0.5
        llmTopP:
          maximum: 1
          exclusiveMaximum: false
          minimum: 0
          exclusiveMinimum: false
          type: number
          description: >-
            Controls how diverse the output is by selecting from the most
            probable tokens within a probability limit. Lower values make
            responses more focused. If not provided, the default value is
            derived from the selected llmModel.
          format: double
          example: 0.5
        llmTopK:
          maximum: 200
          minimum: 0
          type: integer
          description: >-
            Limits token selection to the top-k most probable tokens. Lower
            values make output more deterministic; higher values increase
            variation. If not provided, the default value is derived from the
            selected llmModel
          format: int32
          example: 40
        voiceId:
          type: string
          description: This is the AI's speaking voice id.
          example: elevenlabs_SGbOfpm28edC83pZ9iGb
          default: elevenlabs_EXAVITQu4vr4xnSDxMaL
        voiceModelId:
          type: string
          description: >-
            Specifies the text-to-speech (TTS) model used by the agent to
            generate spoken audio responses. Different models may vary in voice
            quality, latency, language support, and naturalness.
          example: eleven_turbo_v2_5
          default: eleven_turbo_v2_5
          enum:
            - eleven_multilingual_v2
            - eleven_flash_v2_5
            - eleven_turbo_v2_5
            - eleven_turbo_v2
            - eleven_flash_v2
            - eleven_multilingual_v1
            - eleven_monolingual_v1
            - tts-1
            - tts-1-hd
            - gpt-4o-mini-tts
            - sonic
            - sonic-2
            - sonic-lite
            - sonic-preview
            - sonic-turbo
            - arcana
            - mist
            - mistv2
            - octave2_multi
            - inworld-tts-1
            - inworld-tts-1-max
        ttsSpeed:
          maximum: 2
          exclusiveMaximum: false
          minimum: 0.6
          exclusiveMinimum: false
          type: number
          description: >-
            Controls the speech playback speed. Lower values make speech slower;
            higher values make it faster.
          format: double
          example: 0.7
        ttsTemperature:
          maximum: 2
          minimum: 0
          type: number
          description: >-
            Controls variation in speech delivery. Lower values make speech more
            consistent; higher values add more expressiveness.
          format: double
          example: 0.5
        ttsVolume:
          maximum: 2
          exclusiveMaximum: false
          minimum: 0.5
          exclusiveMinimum: false
          type: number
          description: >-
            Controls the output audio volume. Lower values make it quieter;
            higher values make it louder.
          format: double
          example: 0.5
          default: 0
        aiStartsSpeakingPlan:
          maximum: 1
          minimum: 0
          type: number
          description: How quickly AI starts speaking after user input.
          format: double
          example: 0.5
          default: 1
        aiStopsSpeakingPlan:
          maximum: 1
          minimum: 0
          type: number
          description: How quickly AI stops speaking when interrupted.
          format: double
          example: 0.5
          default: 1
        ivrHangup:
          type: boolean
          description: >-
            Determines whether the call should be automatically disconnected
            when an IVR system is detected during the call.
          example: true
          default: false
        agentTimezone:
          type: string
          description: >-
            The timezone of the agent in IANA format. Used to contextualize
            time-sensitive responses and scheduling.
          example: Asia/Kolkata
          default: UTC
        autoVolumeNormalization:
          type: boolean
          description: >-
            If true, it keeps the user's microphone volume consistent regardless
            of distance or loudness.
          example: true
          default: true
        backgroundNoiseFilter:
          type: boolean
          description: If true, it removes hums, buzzes, and rumbles from the audio signal.
          example: true
          default: false
        echoCancellation:
          type: boolean
          description: >-
            If true, it stops the AI's audio from looping back into the
            microphone.
          example: true
          default: true
        enablePostConversationAnalysis:
          type: boolean
          description: >-
            Indicates whether post-conversation analysis should be performed to
            extract insights after the conversation ends.
          example: true
          default: false
        postConversationAnalysisLlmModel:
          type: string
          description: The language model that powers the AI's post-conversation analysis.
          example: gpt-4o-mini
          default: gpt-4o-mini
          enum:
            - gpt-5.2
            - gpt-5.2-fast-tier
            - gpt-5.1
            - gpt-5.1-fast-tier
            - gpt-5
            - gpt-5-fast-tier
            - gpt-5-mini
            - gpt-5-mini-fast-tier
            - gpt-5-nano
            - gpt-4.1
            - gpt-4.1-fast-tier
            - gpt-4.1-mini
            - gpt-4.1-mini-fast-tier
            - gpt-4.1-nano
            - gpt-4.1-nano-fast-tier
            - gpt-4o
            - gpt-4o-fast-tier
            - gpt-4o-mini
            - gpt-4o-mini-fast-tier
            - claude-haiku-4-5-20251001
            - claude-sonnet-4-5-20250929
            - claude-sonnet-4-20250514
            - gemini-3.1-flash-lite-preview
            - gemini-3-flash-preview
            - gemini-2.5-flash-lite
            - gemini-2.5-flash
        postConversationAnalysis:
          type: array
          description: >-
            List of configurations defining what insights should be extracted
            after the conversation ends.
          items:
            $ref: '#/components/schemas/PostConversationAnalysisRequest'
        webhooks:
          type: array
          description: >-
            List of webhook configurations that define external endpoints to be
            notified on specific events.
          items:
            $ref: '#/components/schemas/WebhookConfigUpdateRequest'
      description: >-
        Request body for updating an existing AI agent, including its
        instructions, welcome message configuration, runtime settings, and
        available tools.
    UpdateToolRequest:
      required:
        - type
      type: object
      properties:
        type:
          type: string
          description: >-
            The type determines the tool’s behavior and configuration schema,
            such as call transfer, variable extraction, IVR navigation,
            integrations, etc.
        nodeId:
          type: string
          description: >-
            The unique identifier of an existing tool within the agent. If
            provided, the corresponding tool will be updated. If omitted, a new
            tool will be created and added to the agent.
        toolName:
          type: string
          description: >-
            A unique name used to identify the tool within an agent. The name
            may contain only alphanumeric characters and underscores (_). If not
            provided, a name will be generated automatically. Tool names must be
            unique within the same agent.
        instruction:
          maxLength: 10000
          minLength: 0
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
      discriminator:
        propertyName: type
        mapping:
          voice_transfer_call:
            $ref: '#/components/schemas/VoiceTransferCallTool'
          extract_variables:
            $ref: '#/components/schemas/ExtractVariablesTool'
          ivr_navigator:
            $ref: '#/components/schemas/IvrNavigatorTool'
          voice_end_call:
            $ref: '#/components/schemas/VoiceEndCallTool'
          integration_tool:
            $ref: '#/components/schemas/IntegrationTool'
      oneOf:
        - $ref: '#/components/schemas/VoiceTransferCallTool'
        - $ref: '#/components/schemas/ExtractVariablesTool'
        - $ref: '#/components/schemas/IvrNavigatorTool'
        - $ref: '#/components/schemas/VoiceEndCallTool'
        - $ref: '#/components/schemas/IntegrationTool'
    CreateAgentSettingsResponse:
      type: object
      properties:
        language:
          type: string
          description: The language your customers will primarily speak during calls.
          example: en_US
          default: en_US
        aiStartsConversation:
          type: boolean
          description: >-
            If true the AI agent will initiate the conversation immediately when
            the call connects. If false the call will connect silently, waiting
            for the customer to speak first before the AI responds
          example: true
          default: true
        backgroundSound:
          type: string
          description: Add ambient background audio during the call.
          example: keyboard_typing
          default: none
          enum:
            - keyboard_typing
            - office_ambience
            - none
        globalPrompt:
          type: string
          description: >-
            A global system prompt that is applied to every conversation to
            define the agent’s overall behavior, tone, and constraints.
          example: >-
            You are a professional virtual assistant. Always respond politely
            and keep answers concise.
        remindersIntervalDuration:
          type: integer
          description: >-
            Interval (in seconds) after which a follow-up reminder is
            automatically sent if the user does not respond.
          format: int32
          example: 15
          default: 10
        remindersLimit:
          type: integer
          description: >-
            Maximum number of follow-up reminders to send when the user does not
            respond.Set to 0 to disable reminders.
          format: int32
          example: 3
          default: 4
        endCallOnSilenceDuration:
          type: number
          description: >-
            Specifies the duration of continuous silence (in minutes) after
            which the call will be automatically ended.
          format: float
          example: 30
          default: 5
        maxCallDuration:
          type: integer
          description: >-
            Maximum call duration (in minutes) before the call is automatically
            terminated.
          format: int32
          example: 40
          default: 60
        llmModel:
          type: string
          description: The language model that powers the AI's responses.
          example: gpt-4o-mini
          default: gpt-4o-mini
        llmTemperature:
          type: number
          description: >-
            Controls randomness in the model's output. Lower values make
            responses more deterministic; higher values make them more creative.
            If not provided, the default value is derived from the selected
            llmModel.
          format: double
          example: 0.5
        llmTopP:
          type: number
          description: >-
            Controls how diverse the output is by selecting from the most
            probable tokens within a probability limit. Lower values make
            responses more focused. If not provided, the default value is
            derived from the selected llmModel.
          format: double
          example: 0.5
        llmTopK:
          type: integer
          description: >-
            Limits token selection to the top-k most probable tokens. Lower
            values make output more deterministic; higher values increase
            variation. If not provided, the default value is derived from the
            selected llmModel
          format: int32
          example: 40
        voiceId:
          type: string
          description: This is the AIs speaking voice id.
          example: elevenlabs_SGbOfpm28edC83pZ9iGb
          default: elevenlabs_EXAVITQu4vr4xnSDxMaL
        voiceModelId:
          type: string
          description: This is the AIs text to speech engine version.
          example: eleven_turbo_v2_5
          default: eleven_turbo_v2_5
        ttsSpeed:
          type: number
          description: >-
            Controls the speech playback speed. Lower values make speech slower;
            higher values make it faster. If not provided, the default value is
            derived from the selected voiceModel.
          format: double
          example: 0.7
        ttsTemperature:
          type: number
          description: >-
            Controls variation in speech delivery. Lower values make speech more
            consistent; higher values add more expressiveness. If not provided,
            the default value is derived from the selected voiceModel.
          format: double
          example: 0.5
        ttsVolume:
          type: number
          description: >-
            Controls the output audio volume. Lower values make it quieter;
            higher values make it louder. If not provided, the default value is
            derived from the selected voiceModel.
          format: double
          example: 0.5
        aiStartsSpeakingPlan:
          type: number
          description: How quickly AI starts speaking after user input.
          format: double
          example: 0.5
          default: 1
        aiStopsSpeakingPlan:
          type: number
          description: How quickly AI stops speaking when interrupted.
          format: double
          example: 0.5
          default: 1
        ivrHangup:
          type: boolean
          description: >-
            Indicates whether post-conversation analysis should be performed to
            extract insights after the conversation ends.
          example: true
          default: false
        agentTimezone:
          type: string
          description: >-
            The timezone of the agent in IANA format. Used to contextualize
            time-sensitive responses and scheduling.
          example: Asia/Kolkata
          default: UTC
        autoVolumeNormalization:
          type: boolean
          description: >-
            If true, it keeps the user's microphone volume consistent regardless
            of distance or loudness.
          example: true
          default: true
        backgroundNoiseFilter:
          type: boolean
          description: If true, it removes hums, buzzes, and rumbles from the audio signal.
          example: true
          default: false
        echoCancellation:
          type: boolean
          description: >-
            If true, it stops the AI's audio from looping back into the
            microphone.
          example: true
          default: true
        enablePostConversationAnalysis:
          type: boolean
          description: >-
            Indicates whether post-conversation analysis should be performed to
            extract insights after the conversation ends.
          example: true
          default: false
        postConversationAnalysisLlmModel:
          type: string
          description: The language model that powers the AI's post-conversation analysis.
          example: gpt-4o-mini
          default: gpt-4o-mini
        postConversationAnalysis:
          type: array
          description: >-
            List of configurations defining what insights should be extracted
            after the conversation ends.
          items:
            $ref: '#/components/schemas/PostConversationAnalysisRequest'
        webhooks:
          type: array
          description: >-
            List of webhook configurations that define external endpoints to be
            notified on specific events.
          items:
            $ref: '#/components/schemas/WebhookConfigResponse'
      description: >-
        Configuration settings that define the agent’s runtime behavior,
        including voice, llm model and other operational settings.
    CreateToolResponse:
      type: object
      properties:
        type:
          type: string
          description: >-
            The type determines the tool’s behavior and configuration schema,
            such as call transfer, variable extraction, IVR navigation,
            integrations, etc.
        nodeId:
          type: string
          description: The unique identifier of the tool within the agent.
        toolName:
          type: string
          description: >-
            A unique name used to identify the tool within an agent. Use this
            name to reference the tool within the agent.
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
      discriminator:
        propertyName: type
        mapping:
          voice_transfer_call:
            $ref: '#/components/schemas/VoiceTransferCallToolResponse'
          extract_variables:
            $ref: '#/components/schemas/ExtractVariablesToolResponse'
          ivr_navigator:
            $ref: '#/components/schemas/IvrNavigatorToolResponse'
          voice_end_call:
            $ref: '#/components/schemas/VoiceEndCallToolResponse'
          integration_tool:
            $ref: '#/components/schemas/IntegrationToolAgentResponse'
      oneOf:
        - $ref: '#/components/schemas/VoiceTransferCallToolResponse'
        - $ref: '#/components/schemas/ExtractVariablesToolResponse'
        - $ref: '#/components/schemas/IvrNavigatorToolResponse'
        - $ref: '#/components/schemas/VoiceEndCallToolResponse'
        - $ref: '#/components/schemas/IntegrationToolAgentResponse'
    PostConversationAnalysisRequest:
      required:
        - dataType
        - insightInstructions
        - insightName
      type: object
      properties:
        insightName:
          type: string
          description: >-
            A Unique name of the insight that will be generated from the
            conversation.
          example: conversation summary
        insightInstructions:
          type: string
          description: >-
            Instructions or prompt that define how the insight should be
            generated from the conversation.
        dataType:
          type: string
          description: Defines the expected data type of the generated insight result.
          example: string
          enum:
            - string
            - boolean
            - number
            - selector
        options:
          type: array
          description: >-
            List of allowed selectable values. Required only when dataType is
            selector.
          example:
            - Interested
            - Not Interested
            - Follow Up Later
          items:
            type: string
            example: '["Interested","Not Interested","Follow Up Later"]'
      description: >-
        List of configurations defining what insights should be extracted after
        the conversation ends.
    WebhookConfigUpdateRequest:
      required:
        - events
        - name
        - url
      type: object
      properties:
        webhookId:
          type: string
          description: A unique identifier for the webhook.
          example: wh_BUbkx3PsbzQm5V10
        name:
          type: string
          description: >-
            Human-readable name for this webhook. Used to identify it in
            listings and dashboards. Does not need to be unique, but a
            descriptive name helps distinguish multiple webhooks on the same
            agent.
          example: Call Events - Production
        url:
          pattern: https?://.+
          type: string
          description: >-
            HTTPS endpoint that will receive event payloads as HTTP POST
            requests. Must be publicly reachable. The system expects an HTTP 2xx
            response within the configured timeout to confirm delivery. Non-2xx
            responses or timeouts are treated as delivery failures.
          example: https://yourapp.com/webhooks/sigmamind
        events:
          uniqueItems: true
          type: array
          description: >-
            Set of event types that will trigger a delivery to this webhook.
            'conversation_started' fires when an agent session begins.
            'conversation_ended' fires when a session closes.
            'conversation_analysed' fires when post-call analysis is complete.
            At least one event must be specified. Only events in this set will
            be sent — all others are silently ignored.
          example:
            - conversation_started
            - conversation_ended
          items:
            type: string
            enum:
              - conversation_started
              - conversation_ended
              - conversation_analysed
      description: >-
        List of webhook configurations that define external endpoints to be
        notified on specific events.
    VoiceTransferCallTool:
      required:
        - transferTo
        - type
      type: object
      description: Transfers the active voice call to another number
      properties:
        type:
          type: string
          example: voice_transfer_call
          enum:
            - voice_transfer_call
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
        transferToRouting:
          type: string
          description: >-
            Defines how the destination for the call transfer is determined. Use
            'static' to always transfer to a fixed phone number. Use 'dynamic'
            to determine the destination at runtime based on conditions or
            extracted variables (e.g., user intent such as OPD, radiology,
            etc.).
          example: static
          default: static
          enum:
            - static
            - dynamic
        transferTo:
          type: string
          description: >-
            Destination for the call transfer. If transferToRouting is 'static',
            provide a valid E.164 formatted phone number. If transferToRouting
            is 'dynamic', provide instructions or a dynamic variable placeholder
            to resolve the destination at runtime. For example: If the user
            wants to connect with OPD, transfer to {{dynamic_variable}} or a
            specific number. If the user wants to connect with radiology,
            transfer to {{dynamic_variable}} or a specific number.
          example: +9187788XXXXX
        extensionNumber:
          pattern: ^[0-9]{1,10}$|^\{\{.+\}\}$
          type: string
          description: >-
            Optional extension number to dial after the call is transferred.
            This is typically used in IVR systems to reach a specific department
            or user.
          example: '1234'
        transferSettings:
          $ref: '#/components/schemas/TransferSettings'
    ExtractVariablesTool:
      required:
        - type
        - variables
      type: object
      description: Extracts and stores named variables from the conversation
      properties:
        type:
          type: string
          example: extract_variables
          enum:
            - extract_variables
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
        variables:
          type: array
          description: List of variables to extract from the conversation
          items:
            $ref: '#/components/schemas/Variable'
    IvrNavigatorTool:
      required:
        - type
      type: object
      description: This tool is used to navigate through IVR.
      properties:
        type:
          type: string
          example: ivr_navigator
          enum:
            - ivr_navigator
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
        ivrStartsConversation:
          type: boolean
          description: >-
            Indicates whether the call is initiated by an IVR (Interactive Voice
            Response) system. Set to true when the interaction begins with an
            automated IVR prompt before connecting to an agent or system flow.
          example: true
          default: true
        pauseDelay:
          maximum: 30000
          minimum: 500
          type: integer
          description: >-
            Specifies the duration (in milliseconds) to wait before assuming the
            IVR system has finished its input or prompt. This delay helps ensure
            that subsequent actions are triggered only after the IVR interaction
            is complete.
          format: int64
          example: 4000
          default: 2000
    VoiceEndCallTool:
      required:
        - type
      type: object
      description: Ends the current voice call
      properties:
        type:
          type: string
          example: voice_end_call
          enum:
            - voice_end_call
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
    IntegrationTool:
      required:
        - toolId
        - type
      type: object
      description: Triggers an action from a connected app (e.g. Shopify, HubSpot)
      properties:
        type:
          type: string
          description: Type of the tool
          example: integration_tool
          enum:
            - integration_tool
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
        toolId:
          type: string
          description: toolId of the specific integration tool to execute
          example: tool_0QqvBhLiudhHyMDC
        speakWhileWaiting:
          type: boolean
          description: >-
            If enabled, the agent will provide filler or holding speech while
            waiting for the tool to respond.
          example: true
          default: true
        placeholders:
          type: object
          additionalProperties:
            type: string
            description: >-
              Defines values for the placeholders expected by the integration
              tool. Each key represents a placeholder name and its value can
              either be a static value or a dynamic variable using the format
              {{variable_name}} to inject runtime data.
          description: >-
            Defines values for the placeholders expected by the integration
            tool. Each key represents a placeholder name and its value can
            either be a static value or a dynamic variable using the format
            {{variable_name}} to inject runtime data.
        mapVariables:
          type: object
          additionalProperties:
            type: string
            description: >-
              Maps the response paths of the tool to dynamic variables. Each key
              is the variable name and the value is the mapped response path.
          description: >-
            Maps the response paths of the tool to dynamic variables. Each key
            is the variable name and the value is the mapped response path.
    WebhookConfigResponse:
      type: object
      properties:
        webhookId:
          type: string
          description: A unique identifier for the webhook.
          example: wh_BUbkx3PsbzQm5V10
        name:
          type: string
          description: >-
            Human-readable name for this webhook. Used to identify it in
            listings and dashboards. Does not need to be unique, but a
            descriptive name helps distinguish multiple webhooks on the same
            agent.
          example: My Webhook
        url:
          pattern: https?://.+
          type: string
          description: >-
            HTTPS endpoint that will receive event payloads as HTTP POST
            requests. Must be publicly reachable. The system expects an HTTP 2xx
            response within the configured timeout to confirm delivery. Non-2xx
            responses or timeouts are treated as delivery failures.
          example: https://example.com/webhook
        secret:
          type: string
          description: >-
            Secret key used to authenticate webhook payloads. This key should be
            securely stored and verified on the receiving server.
          example: mK9vXq2pL8nR5tY1wA3sD6fH0jC4bE7u
        events:
          type: array
          description: >-
            Set of event types that will trigger a delivery to this webhook.
            'conversation_started' fires when an agent session begins.
            'conversation_ended' fires when a session closes.
            'conversation_analysed' fires when post-call analysis is complete.
            At least one event must be specified. Only events in this set will
            be sent — all others are silently ignored.
          items:
            type: string
            description: >-
              List of webhook configurations that define external endpoints to
              be notified on specific events.
    VoiceTransferCallToolResponse:
      type: object
      properties:
        type:
          type: string
          example: voice_transfer_call
          enum:
            - voice_transfer_call
        nodeId:
          type: string
          description: The unique identifier of the tool within the agent.
        toolName:
          type: string
          description: >-
            A unique name used to identify the tool within an agent. Use this
            name to reference the tool within the agent.
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
        transferToRouting:
          type: string
          description: >-
            Defines how the destination for the call transfer is determined. Use
            'static' to always transfer to a fixed phone number. Use 'dynamic'
            to determine the destination at runtime based on conditions or
            extracted variables (e.g., user intent such as OPD, radiology,
            etc.).
          example: static
          default: static
          enum:
            - static
            - dynamic
        transferTo:
          type: string
          description: >-
            Destination for the call transfer. If transferToRouting is 'static',
            provide a valid E.164 formatted phone number. If transferToRouting
            is 'dynamic', provide instructions or a dynamic variable placeholder
            to resolve the destination at runtime. For example: If the user
            wants to connect with OPD, transfer to {{dynamic_variable}} or a
            specific number. If the user wants to connect with radiology,
            transfer to {{dynamic_variable}} or a specific number.
          example: +9187788XXXXX
        extensionNumber:
          type: string
          description: >-
            Optional extension number to dial after the call is transferred.
            This is typically used in IVR systems to reach a specific department
            or user.
          example: '1234'
        transferSettings:
          $ref: '#/components/schemas/TransferSettings'
      description: Transfers the active voice call to another number
    ExtractVariablesToolResponse:
      type: object
      properties:
        type:
          type: string
          example: extract_variables
          enum:
            - extract_variables
        nodeId:
          type: string
          description: The unique identifier of the tool within the agent.
        toolName:
          type: string
          description: >-
            A unique name used to identify the tool within an agent. Use this
            name to reference the tool within the agent.
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
        variables:
          type: array
          description: List of variables to extract from the conversation
          items:
            $ref: '#/components/schemas/Variable'
      description: Extracts and stores named variables from the conversation
    IvrNavigatorToolResponse:
      type: object
      properties:
        type:
          type: string
          example: ivr_navigator
          enum:
            - ivr_navigator
        nodeId:
          type: string
          description: The unique identifier of the tool within the agent.
        toolName:
          type: string
          description: >-
            A unique name used to identify the tool within an agent. Use this
            name to reference the tool within the agent.
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
        ivrStartsConversation:
          type: boolean
          description: >-
            Indicates whether the call is initiated by an IVR (Interactive Voice
            Response) system. Set to true when the interaction begins with an
            automated IVR prompt before connecting to an agent or system flow.
          example: true
          default: true
        pauseDelay:
          maximum: 30000
          minimum: 500
          type: integer
          description: >-
            Specifies the duration (in milliseconds) to wait before assuming the
            IVR system has finished its input or prompt. This delay helps ensure
            that subsequent actions are triggered only after the IVR interaction
            is complete.
          format: int64
          example: 4000
          default: 2000
      description: This tool is used to navigate through IVR.
    VoiceEndCallToolResponse:
      type: object
      properties:
        type:
          type: string
          example: voice_end_call
          enum:
            - voice_end_call
        nodeId:
          type: string
          description: The unique identifier of the tool within the agent.
        toolName:
          type: string
          description: >-
            A unique name used to identify the tool within an agent. Use this
            name to reference the tool within the agent.
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
      description: Ends the current voice call
    IntegrationToolAgentResponse:
      type: object
      properties:
        type:
          type: string
          description: Type of the tool
          example: integration_tool
          enum:
            - integration_tool
        nodeId:
          type: string
          description: The unique identifier of the tool within the agent.
        toolName:
          type: string
          description: >-
            A unique name used to identify the tool within an agent. Use this
            name to reference the tool within the agent.
        instruction:
          type: string
          description: >-
            Instructions that define when the agent should invoke this tool
            during a conversation. Use this field to describe the scenarios,
            user intents, or conditions under which the tool should be
            triggered.
        toolId:
          type: string
          description: The specific tool to execute
          example: tool_0QqvBhLiudhHyMDC
        speakWhileWaiting:
          type: boolean
          description: >-
            If enabled, the agent will provide filler or holding speech while
            waiting for the tool to respond
          example: true
          default: true
        placeholders:
          type: object
          additionalProperties:
            type: string
            description: >-
              Defines values for the placeholders expected by the integration
              tool. Each key represents a placeholder name and its value can
              either be a static value or a dynamic variable using the format
              {{variable_name}} to inject runtime data.
          description: >-
            Defines values for the placeholders expected by the integration
            tool. Each key represents a placeholder name and its value can
            either be a static value or a dynamic variable using the format
            {{variable_name}} to inject runtime data.
        mapVariables:
          type: object
          additionalProperties:
            type: string
            description: >-
              Maps the response paths of the tool to dynamic variables. Each key
              is the variable name and the value is the mapped response path
          description: >-
            Maps the response paths of the tool to dynamic variables. Each key
            is the variable name and the value is the mapped response path
      description: Triggers an action from a connected app (e.g. Shopify, HubSpot)
    TransferSettings:
      required:
        - transferType
      type: object
      properties:
        transferType:
          type: string
          description: >-
            Type of transfer to perform. 'warm' keeps the current agent
            connected during the transfer, while 'cold' disconnects the agent
            immediately after initiating the transfer.
          enum:
            - warm
            - cold
          default: warm
        ringingDuration:
          maximum: 60
          minimum: 25
          type: integer
          description: >-
            Specifies the maximum duration (in seconds) to wait for the call to
            be answered.
          format: int32
          example: 40
          default: 30
        waitForParticipantAnswer:
          type: boolean
          description: If true, agent will wait for the new participant to answer the call.
          default: true
        enableWhisperMessage:
          type: boolean
          description: >-
            If true, a whisper message will be played privately to the
            destination participant before the caller is connected.
          default: true
        whisperMessage:
          type: string
          description: >-
            The content of the whisper message. Its interpretation depends on
            whisperMessageType. If the type is 'static', this text is played
            directly. If the type is 'prompt', the text is treated as a prompt
            that the system uses to dynamically generate the whisper message.
        whisperMessageType:
          type: string
          description: >-
            Defines how the whisperMessage should be interpreted. 'static' means
            the message is used as-is, while 'prompt' means the message is
            treated as a prompt for generating the final whisper message.
          default: static
          enum:
            - static
            - prompt
        enableThreeWayMessage:
          type: boolean
          description: >-
            If true, a message will be delivered once the call becomes a
            three-way conversation between the caller, the current agent, and
            the destination participant.
          default: true
        threeWayMessage:
          type: string
          description: >-
            The content of the message delivered during the three-way
            connection. Its interpretation depends on threeWayMessageType. If
            'static', the message is used directly. If 'prompt', it is treated
            as a prompt for generating the final message.
        threeWayMessageType:
          type: string
          description: >-
            Defines how the threeWayMessage should be interpreted. 'static'
            means the message is used as-is, while 'prompt' means the message is
            treated as a prompt for generating the final message.
          default: static
          enum:
            - static
            - prompt
        customHeaders:
          type: object
          description: Send custom header key and values along with call transfer.
          additionalProperties:
            oneOf:
              - type: string
              - type: number
              - type: boolean
              - type: object
              - type: array
      description: Configuration for the call transfer behaviour
    Variable:
      required:
        - description
        - variableName
      type: object
      properties:
        variableName:
          type: string
          description: Name of the variable
          example: customer_name
        dataType:
          type: string
          description: Data type of the variable to be extracted.
          example: dateTimeIso8601
          enum:
            - text
            - boolean
            - number
            - dateTimeIso8601
        description:
          type: string
          description: Description of what this variable represents
      description: >-
        Defines a variable to be extracted from a conversation, including its
        name, data type, and description. 
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Authenticate every request by passing your API key in the `X-API-Key`
        header. To get your key, go to Dashboard → API Keys and create or copy
        your Production API key.
      name: X-API-Key
      in: header

````