> ## Documentation Index
> Fetch the complete documentation index at: https://hanabiaiinc-him188-rename-multi-turn-simulation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Draft Config

> Patch the draft configuration section by section; omitted sections keep
their value.



## OpenAPI

````yaml patch /v1/agent/agents/{agent_id}/config
openapi: 3.1.0
info:
  title: FishAudio OpenAPI
  version: '1'
servers:
  - description: Fish Audio API
    url: https://api.fish.audio
security: []
tags: []
paths:
  /v1/agent/agents/{agent_id}/config:
    patch:
      tags:
        - Agents
      summary: Update Draft Config
      description: >-
        Patch the draft configuration section by section; omitted sections keep

        their value. Changes only affect live sessions after the next publish.

        `prompt.system_prompt` is limited to 32000 tokens (422 beyond); keeping
        it

        under 2000 tokens is recommended for latency and cost.

        `voice.voice_id` accepts any public voice model id.

        `voice.speaking_language` accepts any of the 52 supported ISO 639-1
        codes

        (the same set the console offers, see the Voice & language docs);
        anything else is 422. `voice.expressive` (default `true`) enables richer

        expressive delivery (emotion steering, laughter and sounds, pauses); off

        keeps the standard delivery. The `asr` section configures speech

        recognition. `asr.model` picks the model: `deepgram:nova-3` (default),

        `elevenlabs:scribe_v2_realtime`, or `elevenlabs:scribe_v2_medical`.

        `asr.multilingual` (default `false`) lets recognition follow callers who

        switch language mid-call, off tells the recognizer to expect

        `voice.speaking_language` (models other than `deepgram:nova-3` may still

        transcribe clear speech in another language). `asr.strict_language`

        (default `false`) enforces `voice.speaking_language` whatever

        `asr.multilingual` says: speech recognized as another language reaches
        the

        agent as `[unintelligible speech]`. Language is detected per utterance,
        so

        a short or heavily accented phrase in the speaking language can

        occasionally be detected as another language and replaced too. Only

        enable it when you explicitly need to stop the agent from understanding

        other languages.

        `asr.keyterms` is a recognition

        vocabulary of up to 50 plain terms (brand names, product terms, personal

        names), each at most 100 characters with no commas or semicolons. `[]`

        clears it and 20-50 focused terms work best. `tool_ids` and

        `knowledge_source_ids` replace their attachment lists wholesale and
        every

        id must resolve, else 422. `llm.custom` points the agent at your own

        OpenAI-compatible endpoint; mutually exclusive with `llm.model`, cleared

        with an explicit null.
      parameters:
        - in: path
          name: agent_id
          description: ''
          required: true
          schema:
            title: Agent Id
            type: string
          deprecated: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicAgentConfigPatchPayload'
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  agent_id:
                    title: Agent Id
                    type: string
                  config_hash:
                    description: >-
                      Content hash of the draft; equal to a version's
                      config_hash when the draft has no unpublished changes.
                    title: Config Hash
                    type: string
                  prompt:
                    $ref: '#/components/schemas/AgentPromptConfig'
                  voice:
                    $ref: '#/components/schemas/AgentVoiceConfigView'
                  asr:
                    $ref: '#/components/schemas/AgentAsrConfig'
                  conversation:
                    $ref: '#/components/schemas/AgentConversationConfig'
                  tools:
                    $ref: '#/components/schemas/PublicAgentToolsConfig'
                  webhooks:
                    $ref: '#/components/schemas/PublicAgentWebhooksConfig'
                  knowledge_base:
                    $ref: '#/components/schemas/PublicAgentKnowledgeBaseConfig'
                  analysis:
                    $ref: '#/components/schemas/AgentAnalysisConfig'
                  guardrails:
                    $ref: '#/components/schemas/AgentGuardrailsConfig'
                  llm:
                    $ref: '#/components/schemas/AgentLLMConfigRedacted'
                  updated_at:
                    format: date-time
                    title: Updated At
                    type: string
                required:
                  - agent_id
                  - config_hash
                  - prompt
                  - voice
                  - asr
                  - conversation
                  - tools
                  - webhooks
                  - knowledge_base
                  - analysis
                  - guardrails
                  - llm
                  - updated_at
                type: object
        '401':
          description: No permission -- see authorization schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '404':
          description: Nothing matches the given URI
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '409':
          description: Request conflict
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '422':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '503':
          description: The server cannot process the request due to a high load
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: bash
          label: Update Draft Config
          source: |-
            curl --request PATCH \
              --url https://api.fish.audio/v1/agent/agents/<agent-id>/config \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
                "prompt": {
                  "system_prompt": "You are the receptionist for Fish Dental."
                },
                "webhooks": {
                  "post_call": [
                    {
                      "url": "https://example.com/hooks/fish",
                      "secret": "<signing-secret>"
                    }
                  ]
                }
              }'
components:
  schemas:
    PublicAgentConfigPatchPayload:
      additionalProperties: false
      properties:
        prompt:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentPromptPatch'
            - type: 'null'
          default: null
        voice:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentVoicePatch'
            - type: 'null'
          default: null
        asr:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentAsrPatch'
            - type: 'null'
          default: null
        conversation:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentConversationPatch'
            - type: 'null'
          default: null
        tools:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentToolsPatch'
            - type: 'null'
          default: null
        webhooks:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentWebhooksPatch'
            - type: 'null'
          default: null
        knowledge_base:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentKnowledgeBasePatch'
            - type: 'null'
          default: null
        analysis:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentAnalysisPatch'
            - type: 'null'
          default: null
        guardrails:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentGuardrailsPatch'
            - type: 'null'
          default: null
        llm:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentLLMPatch'
            - type: 'null'
          default: null
      title: PublicAgentConfigPatchPayload
      type: object
    AgentPromptConfig:
      properties:
        system_prompt:
          default: ''
          title: System Prompt
          type: string
        first_message_mode:
          default: prompt
          enum:
            - 'off'
            - fixed
            - prompt
          title: First Message Mode
          type: string
        first_message:
          default: Hi! Thanks for calling — how can I help you today?
          title: First Message
          type: string
        first_message_prompt:
          default: Greet the caller and ask what you can help with.
          title: First Message Prompt
          type: string
      title: AgentPromptConfig
      type: object
    AgentVoiceConfigView:
      description: >-
        Read shape of the voice section. The ASR fields that moved to the asr

        section stay mirrored here, deprecated, so clients written before the
        split

        keep reading them.
      properties:
        voice_id:
          default: b347db033a6549378b48d00acb0d06cd
          title: Voice Id
          type: string
        speaking_language:
          default: en
          enum:
            - en
            - ja
            - zh
            - ko
            - es
            - fr
            - de
            - pt
            - it
            - nl
            - ar
            - hi
            - id
            - tr
            - ru
            - bg
            - sr
            - hr
            - cs
            - sk
            - pl
            - uk
            - ro
            - hu
            - el
            - sv
            - da
            - 'no'
            - fi
            - et
            - lv
            - lt
            - ca
            - he
            - fa
            - ur
            - kk
            - ka
            - hy
            - bn
            - ta
            - te
            - kn
            - mr
            - gu
            - pa
            - ne
            - th
            - vi
            - ms
            - tl
            - af
          title: Speaking Language
          type: string
        expressive:
          default: false
          title: Expressive
          type: boolean
        speed:
          default: 1
          maximum: 2
          minimum: 0.5
          title: Speed
          type: number
      title: AgentVoiceConfigView
      type: object
    AgentAsrConfig:
      properties:
        model:
          default: deepgram:nova-3
          enum:
            - deepgram:nova-3
            - elevenlabs:scribe_v2_realtime
            - elevenlabs:scribe_v2_medical
          title: Model
          type: string
        multilingual:
          default: false
          title: Multilingual
          type: boolean
        strict_language:
          default: false
          description: >-
            Enforces voice.speaking_language whatever multilingual says: speech
            recognized as another language reaches the agent as [unintelligible
            speech]. Language is detected per utterance, so a short or heavily
            accented phrase in the speaking language can occasionally be
            detected as another language and replaced too. With deepgram:nova-3,
            speech in another language is usually not transcribed at all. Only
            enable it when you explicitly need to stop the agent from
            understanding other languages.
          title: Strict Language
          type: boolean
        keyterms:
          items:
            type: string
          maxItems: 50
          title: Keyterms
          type: array
      title: AgentAsrConfig
      type: object
    AgentConversationConfig:
      properties:
        max_duration_seconds:
          default: 1800
          title: Max Duration Seconds
          type: integer
        response_wait_ms:
          default: 550
          title: Response Wait Ms
          type: integer
        eagerness:
          default: balanced
          enum:
            - relaxed
            - balanced
            - eager
          title: Eagerness
          type: string
        response_max_wait_ms:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Response Max Wait Ms
        interruptible:
          default: true
          title: Interruptible
          type: boolean
        interruption_sensitivity:
          default: balanced
          enum:
            - low
            - balanced
            - high
          title: Interruption Sensitivity
          type: string
        interruption_ignore_phrases:
          default: []
          items:
            type: string
          title: Interruption Ignore Phrases
          type: array
        speculative_response:
          default: true
          title: Speculative Response
          type: boolean
        reengage_enabled:
          default: false
          title: Reengage Enabled
          type: boolean
        hangup_after_seconds:
          default: 60
          title: Hangup After Seconds
          type: integer
        hangup_farewell_enabled:
          default: false
          title: Hangup Farewell Enabled
          type: boolean
        record_audio:
          default: true
          title: Record Audio
          type: boolean
        timezone:
          default: ''
          title: Timezone
          type: string
        transfer_destinations:
          default: []
          items:
            $ref: '#/components/schemas/AgentTransferDestination'
          title: Transfer Destinations
          type: array
        outbound:
          anyOf:
            - $ref: '#/components/schemas/AgentOutboundConfig'
            - type: 'null'
          default: null
      title: AgentConversationConfig
      type: object
    PublicAgentToolsConfig:
      properties:
        enabled:
          default: true
          title: Enabled
          type: boolean
        tool_ids:
          items:
            type: string
          title: Tool Ids
          type: array
        system_tools:
          $ref: '#/components/schemas/AgentSystemToolsConfig'
      title: PublicAgentToolsConfig
      type: object
    PublicAgentWebhooksConfig:
      properties:
        conversation_init:
          anyOf:
            - $ref: '#/components/schemas/PublicConversationInitWebhook'
            - type: 'null'
          default: null
        post_call:
          items:
            $ref: '#/components/schemas/PublicPostCallWebhook'
          title: Post Call
          type: array
      title: PublicAgentWebhooksConfig
      type: object
    PublicAgentKnowledgeBaseConfig:
      properties:
        enabled:
          default: false
          title: Enabled
          type: boolean
        knowledge_source_ids:
          items:
            type: string
          title: Knowledge Source Ids
          type: array
      title: PublicAgentKnowledgeBaseConfig
      type: object
    AgentAnalysisConfig:
      properties:
        summary:
          $ref: '#/components/schemas/AgentAnalysisSummaryConfig'
        data_fields:
          items:
            $ref: '#/components/schemas/AgentAnalysisDataField'
          maxItems: 20
          title: Data Fields
          type: array
        criteria:
          items:
            $ref: '#/components/schemas/AgentAnalysisCriterion'
          maxItems: 10
          title: Criteria
          type: array
      title: AgentAnalysisConfig
      type: object
    AgentGuardrailsConfig:
      properties:
        focus:
          default: false
          title: Focus
          type: boolean
        manipulation:
          default: false
          title: Manipulation
          type: boolean
      title: AgentGuardrailsConfig
      type: object
    AgentLLMConfigRedacted:
      properties:
        model:
          default: google/gemini-3.6-flash
          enum:
            - google/gemini-3.5-flash-lite
            - google/gemini-3.6-flash
            - google/gemini-2.5-flash
            - google/gemma-4-26b-a4b-it
            - anthropic/claude-haiku-4.5
            - anthropic/claude-sonnet-4.6
            - openai/gpt-5.6-luna
            - openai/gpt-4o
            - openai/gpt-4.1
          title: Model
          type: string
        custom:
          anyOf:
            - $ref: '#/components/schemas/AgentLLMCustomConfigRedacted'
            - type: 'null'
          default: null
      title: AgentLLMConfigRedacted
      type: object
    PublicAgentPromptPatch:
      additionalProperties: false
      properties:
        system_prompt:
          anyOf:
            - maxLength: 500000
              type: string
            - type: 'null'
          default: null
          description: >-
            Limited to 32000 tokens (o200k_base); keeping it under 2000 tokens
            is recommended for latency and cost.
          title: System Prompt
        first_message_mode:
          anyOf:
            - enum:
                - 'off'
                - fixed
                - prompt
              type: string
            - type: 'null'
          default: null
          title: First Message Mode
        first_message:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          title: First Message
        first_message_prompt:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          title: First Message Prompt
      title: PublicAgentPromptPatch
      type: object
    PublicAgentVoicePatch:
      additionalProperties: false
      properties:
        voice_id:
          anyOf:
            - maxLength: 256
              type: string
            - type: 'null'
          default: null
          title: Voice Id
        speaking_language:
          anyOf:
            - enum:
                - en
                - ja
                - zh
                - ko
                - es
                - fr
                - de
                - pt
                - it
                - nl
                - ar
                - hi
                - id
                - tr
                - ru
                - bg
                - sr
                - hr
                - cs
                - sk
                - pl
                - uk
                - ro
                - hu
                - el
                - sv
                - da
                - 'no'
                - fi
                - et
                - lv
                - lt
                - ca
                - he
                - fa
                - ur
                - kk
                - ka
                - hy
                - bn
                - ta
                - te
                - kn
                - mr
                - gu
                - pa
                - ne
                - th
                - vi
                - ms
                - tl
                - af
              type: string
            - type: 'null'
          default: null
          title: Speaking Language
        expressive:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Expressive
        speed:
          anyOf:
            - maximum: 2
              minimum: 0.5
              type: number
            - type: 'null'
          default: null
          title: Speed
      title: PublicAgentVoicePatch
      type: object
    PublicAgentAsrPatch:
      additionalProperties: false
      properties:
        model:
          anyOf:
            - enum:
                - deepgram:nova-3
                - elevenlabs:scribe_v2_realtime
                - elevenlabs:scribe_v2_medical
              type: string
            - type: 'null'
          default: null
          title: Model
        multilingual:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Multilingual
        strict_language:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Enforces voice.speaking_language whatever multilingual says: speech
            recognized as another language reaches the agent as [unintelligible
            speech]. Language is detected per utterance, so a short or heavily
            accented phrase in the speaking language can occasionally be
            detected as another language and replaced too. With deepgram:nova-3,
            speech in another language is usually not transcribed at all. Only
            enable it when you explicitly need to stop the agent from
            understanding other languages.
          title: Strict Language
        keyterms:
          anyOf:
            - items:
                type: string
              maxItems: 50
              type: array
            - type: 'null'
          default: null
          title: Keyterms
      title: PublicAgentAsrPatch
      type: object
    PublicAgentConversationPatch:
      additionalProperties: false
      properties:
        max_duration_seconds:
          anyOf:
            - maximum: 3600
              minimum: 60
              type: integer
            - type: 'null'
          default: null
          title: Max Duration Seconds
        response_wait_ms:
          anyOf:
            - maximum: 2000
              minimum: 300
              type: integer
            - type: 'null'
          default: null
          title: Response Wait Ms
        eagerness:
          anyOf:
            - enum:
                - relaxed
                - balanced
                - eager
              type: string
            - type: 'null'
          default: null
          title: Eagerness
        response_max_wait_ms:
          anyOf:
            - maximum: 4000
              minimum: 0
              type: integer
            - type: 'null'
          default: null
          title: Response Max Wait Ms
        interruptible:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Interruptible
        interruption_sensitivity:
          anyOf:
            - enum:
                - low
                - balanced
                - high
              type: string
            - type: 'null'
          default: null
          title: Interruption Sensitivity
        interruption_ignore_phrases:
          anyOf:
            - items:
                type: string
              maxItems: 50
              type: array
            - type: 'null'
          default: null
          title: Interruption Ignore Phrases
        speculative_response:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Speculative Response
        reengage_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Reengage Enabled
        hangup_after_seconds:
          anyOf:
            - maximum: 3600
              minimum: 10
              type: integer
            - type: 'null'
          default: null
          title: Hangup After Seconds
        hangup_farewell_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Hangup Farewell Enabled
        record_audio:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Record Audio
        timezone:
          anyOf:
            - maxLength: 64
              type: string
            - type: 'null'
          default: null
          title: Timezone
        transfer_destinations:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentTransferDestinationPatch'
              type: array
            - type: 'null'
          default: null
          title: Transfer Destinations
        outbound:
          anyOf:
            - $ref: '#/components/schemas/AgentOutboundPatch'
            - type: 'null'
          default: null
      title: PublicAgentConversationPatch
      type: object
    PublicAgentToolsPatch:
      additionalProperties: false
      properties:
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Enabled
        tool_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: >-
            Replaces the attached tool set wholesale. Every id must be an
            existing tool in the agent's workspace, else 422.
          title: Tool Ids
        system_tools:
          anyOf:
            - $ref: '#/components/schemas/PublicSystemToolsPatch'
            - type: 'null'
          default: null
      title: PublicAgentToolsPatch
      type: object
    PublicAgentWebhooksPatch:
      additionalProperties: false
      properties:
        conversation_init:
          anyOf:
            - $ref: '#/components/schemas/PublicConversationInitWebhookPayload'
            - type: 'null'
          default: null
          description: >-
            Pre-call webhook for inbound phone calls: called while the call is
            being set up; the response's dynamic_variables render into the
            published prompt before the agent speaks. An explicit null removes
            it. Takes effect after the next publish.
        post_call:
          anyOf:
            - items:
                $ref: '#/components/schemas/PublicPostCallWebhookPayload'
              maxItems: 5
              type: array
            - type: 'null'
          default: null
          description: >-
            Up to 5 endpoints, each receiving every post-call event. Replaces
            the configured list wholesale; a single object is still accepted and
            is stored as a one-element list, and null (or an empty list) clears
            every endpoint. URLs must be unique.
          title: Post Call
      title: PublicAgentWebhooksPatch
      type: object
    PublicAgentKnowledgeBasePatch:
      additionalProperties: false
      properties:
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Whether the agent retrieves from its attached sources. Defaults to
            true when omitted alongside a non-empty knowledge_source_ids; send
            false explicitly to attach sources without using them yet.
          title: Enabled
        knowledge_source_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: >-
            Replaces the attached knowledge sources wholesale. Every id must be
            an existing knowledge source visible to the agent, else 422.
          title: Knowledge Source Ids
      title: PublicAgentKnowledgeBasePatch
      type: object
    PublicAgentAnalysisPatch:
      additionalProperties: false
      properties:
        summary:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentAnalysisSummaryPatch'
            - type: 'null'
          default: null
        data_fields:
          anyOf:
            - items:
                $ref: '#/components/schemas/PublicAgentAnalysisDataField'
              maxItems: 20
              type: array
            - type: 'null'
          default: null
          title: Data Fields
        criteria:
          anyOf:
            - items:
                $ref: '#/components/schemas/PublicAgentAnalysisCriterion'
              maxItems: 10
              type: array
            - type: 'null'
          default: null
          title: Criteria
      title: PublicAgentAnalysisPatch
      type: object
    PublicAgentGuardrailsPatch:
      additionalProperties: false
      properties:
        focus:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Focus
        manipulation:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Manipulation
      title: PublicAgentGuardrailsPatch
      type: object
    PublicAgentLLMPatch:
      additionalProperties: false
      properties:
        model:
          anyOf:
            - enum:
                - google/gemini-3.5-flash-lite
                - google/gemini-3.6-flash
                - google/gemini-2.5-flash
                - google/gemma-4-26b-a4b-it
                - anthropic/claude-haiku-4.5
                - anthropic/claude-sonnet-4.6
                - openai/gpt-5.6-luna
                - openai/gpt-4o
                - openai/gpt-4.1
              type: string
            - type: 'null'
          default: null
          title: Model
        custom:
          anyOf:
            - $ref: '#/components/schemas/PublicAgentLLMCustomConfig'
            - type: 'null'
          default: null
          description: >-
            Your own OpenAI-compatible endpoint; mutually exclusive with
            `model`, explicit null reverts to the platform model.
      title: PublicAgentLLMPatch
      type: object
    AgentTransferDestination:
      properties:
        type:
          default: phone
          enum:
            - phone
            - sip
          title: Type
          type: string
        label:
          default: ''
          title: Label
          type: string
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Phone Number
        sip_uri:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Sip Uri
        description:
          default: ''
          title: Description
          type: string
        mode:
          default: cold
          enum:
            - cold
            - warm
          title: Mode
          type: string
        warm_connect:
          default: confirm
          enum:
            - confirm
            - briefing
            - direct
          title: Warm Connect
          type: string
        warm_briefing_instructions:
          default: ''
          title: Warm Briefing Instructions
          type: string
        on_failure:
          $ref: '#/components/schemas/AgentTransferOnFailure'
      title: AgentTransferDestination
      type: object
    AgentOutboundConfig:
      description: >-
        Deprecated (2026-09-07): kept for compatibility only. `amd_enabled` and

        `voicemail` no longer change call behavior; outbound calls greet as soon
        as

        the callee answers, and `answered_by` is always `unknown`.
      properties:
        amd_enabled:
          default: true
          title: Amd Enabled
          type: boolean
        voicemail:
          anyOf:
            - $ref: '#/components/schemas/AgentOutboundVoicemailConfig'
            - type: 'null'
          default: null
      title: AgentOutboundConfig
      type: object
    AgentSystemToolsConfig:
      properties:
        hang_up_call:
          default: false
          title: Hang Up Call
          type: boolean
      title: AgentSystemToolsConfig
      type: object
    PublicConversationInitWebhook:
      properties:
        url:
          title: Url
          type: string
        has_secret:
          default: false
          description: >-
            Whether a signing secret is configured; the value itself is never
            returned.
          title: Has Secret
          type: boolean
        timeout_seconds:
          default: 5
          title: Timeout Seconds
          type: number
      required:
        - url
      title: PublicConversationInitWebhook
      type: object
    PublicPostCallWebhook:
      properties:
        url:
          title: Url
          type: string
        has_secret:
          default: false
          description: >-
            Whether a signing secret is configured; the value itself is never
            returned.
          title: Has Secret
          type: boolean
      required:
        - url
      title: PublicPostCallWebhook
      type: object
    AgentAnalysisSummaryConfig:
      properties:
        enabled:
          default: true
          title: Enabled
          type: boolean
        prompt:
          anyOf:
            - maxLength: 1000
              type: string
            - type: 'null'
          default: null
          title: Prompt
        language:
          default: en
          enum:
            - en
            - ja
            - zh
            - ko
            - es
            - fr
            - de
            - pt
            - it
            - nl
            - ar
            - hi
            - id
            - tr
            - ru
            - bg
            - sr
            - hr
            - cs
            - sk
            - pl
            - uk
            - ro
            - hu
            - el
            - sv
            - da
            - 'no'
            - fi
            - et
            - lv
            - lt
            - ca
            - he
            - fa
            - ur
            - kk
            - ka
            - hy
            - bn
            - ta
            - te
            - kn
            - mr
            - gu
            - pa
            - ne
            - th
            - vi
            - ms
            - tl
            - af
          title: Language
          type: string
      title: AgentAnalysisSummaryConfig
      type: object
    AgentAnalysisDataField:
      properties:
        name:
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Name
          type: string
        type:
          default: text
          enum:
            - boolean
            - text
            - number
            - enum
          title: Type
          type: string
        description:
          default: ''
          maxLength: 500
          title: Description
          type: string
        enum_options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Enum Options
      required:
        - name
      title: AgentAnalysisDataField
      type: object
    AgentAnalysisCriterion:
      properties:
        name:
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Name
          type: string
        description:
          default: ''
          maxLength: 500
          title: Description
          type: string
      required:
        - name
      title: AgentAnalysisCriterion
      type: object
    AgentLLMCustomConfigRedacted:
      description: 'Read entity: the stored api_key never leaves the collection.'
      properties:
        base_url:
          minLength: 1
          title: Base Url
          type: string
        model:
          minLength: 1
          title: Model
          type: string
        api_key:
          default: null
          title: Api Key
          type: 'null'
      required:
        - base_url
        - model
      title: AgentLLMCustomConfigRedacted
      type: object
    AgentTransferDestinationPatch:
      additionalProperties: false
      properties:
        type:
          default: phone
          enum:
            - phone
            - sip
          title: Type
          type: string
        label:
          default: ''
          title: Label
          type: string
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Phone Number
        sip_uri:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Sip Uri
        description:
          default: ''
          title: Description
          type: string
        mode:
          default: cold
          enum:
            - cold
            - warm
          title: Mode
          type: string
        warm_connect:
          default: confirm
          enum:
            - confirm
            - briefing
            - direct
          title: Warm Connect
          type: string
        warm_briefing_instructions:
          default: ''
          title: Warm Briefing Instructions
          type: string
        on_failure:
          $ref: '#/components/schemas/AgentTransferOnFailurePatch'
      title: AgentTransferDestinationPatch
      type: object
    AgentOutboundPatch:
      additionalProperties: false
      properties:
        amd_enabled:
          default: true
          title: Amd Enabled
          type: boolean
        voicemail:
          anyOf:
            - $ref: '#/components/schemas/AgentOutboundVoicemailPatch'
            - type: 'null'
          default: null
      title: AgentOutboundPatch
      type: object
    PublicSystemToolsPatch:
      additionalProperties: false
      properties:
        hang_up_call:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Hang Up Call
      title: PublicSystemToolsPatch
      type: object
    PublicConversationInitWebhookPayload:
      additionalProperties: false
      properties:
        url:
          maxLength: 4000
          minLength: 1
          title: Url
          type: string
        secret:
          anyOf:
            - maxLength: 256
              type: string
            - type: 'null'
          default: null
          description: >-
            Optional HMAC-SHA256 signing secret (X-Fish-Webhook-Signature).
            Write-only: reads report `has_secret` instead of the value. Omit it
            (or send null) to keep the secret already stored for the same url;
            send an empty string to remove it.
          title: Secret
        timeout_seconds:
          default: 5
          description: >-
            How long the platform waits for the endpoint before connecting the
            call without variables.
          maximum: 8
          minimum: 1
          title: Timeout Seconds
          type: number
      required:
        - url
      title: PublicConversationInitWebhookPayload
      type: object
    PublicPostCallWebhookPayload:
      additionalProperties: false
      properties:
        url:
          maxLength: 4000
          minLength: 1
          title: Url
          type: string
        secret:
          anyOf:
            - maxLength: 256
              type: string
            - type: 'null'
          default: null
          description: >-
            Optional HMAC-SHA256 signing secret (X-Fish-Webhook-Signature).
            Write-only: reads report `has_secret` instead of the value. Omit it
            (or send null) to keep the secret already stored for the same url;
            send an empty string to remove it.
          title: Secret
      required:
        - url
      title: PublicPostCallWebhookPayload
      type: object
    PublicAgentAnalysisSummaryPatch:
      additionalProperties: false
      properties:
        enabled:
          default: true
          title: Enabled
          type: boolean
        prompt:
          anyOf:
            - maxLength: 1000
              type: string
            - type: 'null'
          default: null
          title: Prompt
        language:
          default: en
          enum:
            - en
            - ja
            - zh
            - ko
            - es
            - fr
            - de
            - pt
            - it
            - nl
            - ar
            - hi
            - id
            - tr
            - ru
            - bg
            - sr
            - hr
            - cs
            - sk
            - pl
            - uk
            - ro
            - hu
            - el
            - sv
            - da
            - 'no'
            - fi
            - et
            - lv
            - lt
            - ca
            - he
            - fa
            - ur
            - kk
            - ka
            - hy
            - bn
            - ta
            - te
            - kn
            - mr
            - gu
            - pa
            - ne
            - th
            - vi
            - ms
            - tl
            - af
          title: Language
          type: string
      title: PublicAgentAnalysisSummaryPatch
      type: object
    PublicAgentAnalysisDataField:
      additionalProperties: false
      properties:
        name:
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Name
          type: string
        type:
          default: text
          enum:
            - boolean
            - text
            - number
            - enum
          title: Type
          type: string
        description:
          default: ''
          maxLength: 500
          title: Description
          type: string
        enum_options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Enum Options
      required:
        - name
      title: PublicAgentAnalysisDataField
      type: object
    PublicAgentAnalysisCriterion:
      additionalProperties: false
      properties:
        name:
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Name
          type: string
        description:
          default: ''
          maxLength: 500
          title: Description
          type: string
      required:
        - name
      title: PublicAgentAnalysisCriterion
      type: object
    PublicAgentLLMCustomConfig:
      additionalProperties: false
      properties:
        base_url:
          maxLength: 2000
          minLength: 1
          title: Base Url
          type: string
        model:
          maxLength: 256
          minLength: 1
          title: Model
          type: string
        api_key:
          anyOf:
            - maxLength: 4096
              minLength: 1
              type: string
            - type: 'null'
          default: null
          description: >-
            Sent to your endpoint as the Authorization bearer token; write-only,
            reads return null. Required when introducing `custom`; omit to keep
            the stored key when updating.
          title: Api Key
      required:
        - base_url
        - model
      title: PublicAgentLLMCustomConfig
      type: object
    AgentTransferOnFailure:
      properties:
        action:
          default: return_to_agent
          enum:
            - return_to_agent
            - end_call
          title: Action
          type: string
        message:
          default: ''
          title: Message
          type: string
      title: AgentTransferOnFailure
      type: object
    AgentOutboundVoicemailConfig:
      description: >-
        Deprecated (2026-09-07): answering-machine detection was removed from
        the

        call runtime, so voicemail actions never fire. The node is still
        accepted

        and stored so existing configs and API callers keep working; the worker

        no longer receives it.
      properties:
        action:
          default: hangup
          enum:
            - hangup
            - leave_message
            - leave_prompt_message
          title: Action
          type: string
        message:
          default: ''
          title: Message
          type: string
      title: AgentOutboundVoicemailConfig
      type: object
    AgentTransferOnFailurePatch:
      additionalProperties: false
      properties:
        action:
          default: return_to_agent
          enum:
            - return_to_agent
            - end_call
          title: Action
          type: string
        message:
          default: ''
          title: Message
          type: string
      title: AgentTransferOnFailurePatch
      type: object
    AgentOutboundVoicemailPatch:
      additionalProperties: false
      properties:
        action:
          default: hangup
          enum:
            - hangup
            - leave_message
            - leave_prompt_message
          title: Action
          type: string
        message:
          default: ''
          maxLength: 10000
          title: Message
          type: string
      title: AgentOutboundVoicemailPatch
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````