PATCH
/
api
/
external
/
chatbot
/
{chatbotId}
/
voice-agent
curl --request PATCH \
  --url https://v2.okchat.ai/api/external/chatbot/{chatbotId}/voice-agent \
  --header 'Content-Type: application/json' \
  --data '{
  "agentId": "5afe16ed-5fd2-4552-a993-903bc9c32bb6",
  "appearance": {
    "backgroundColor": "#ffffff",
    "borderColor": "#e1e1e1",
    "buttonColor": "#000000",
    "buttonRadius": 32,
    "buttonTextColor": "#ffffff",
    "cardRadius": 20,
    "focusOutlineColor": "#000000",
    "textColor": "#000000"
  },
  "avatar": {
    "imageUrl": "https://assets.grok.com/users/e473c4f6-e103-4d71-8194-03a7ecc74370/0R8nPXaAvhBinoUh-generated_image.jpg"
  },
  "model": {
    "max_output_tokens": 2048,
    "temperature": 0.7
  },
  "text": {
    "callToAction": "Appointment?",
    "endCall": "End",
    "listeningStatus": "Listening",
    "speakingStatus": "Talk to interrupt",
    "startCall": "Start a call"
  },
  "vad": {
    "prefix_padding_ms": 500,
    "silence_duration_ms": 1000,
    "threshold": 0.8
  },
  "voice": "shimmer"
}'
{
  "message": "Voice widget config updated successfully",
  "voice_widget_config": {
    "agentId": "5afe16ed-5fd2-4552-a993-903bc9c32bb6",
    "appearance": {
      "backgroundColor": "#ffffff",
      "borderColor": "#e1e1e1",
      "buttonColor": "#000000",
      "buttonRadius": 32,
      "buttonTextColor": "#ffffff",
      "cardRadius": 20,
      "focusOutlineColor": "#000000",
      "textColor": "#000000"
    },
    "avatar": {
      "imageUrl": "https://assets.grok.com/users/e473c4f6-e103-4d71-8194-03a7ecc74370/0R8nPXaAvhBinoUh-generated_image.jpg"
    },
    "model": {
      "max_output_tokens": 2048,
      "temperature": 0.7
    },
    "text": {
      "callToAction": "Appointment?",
      "endCall": "End",
      "listeningStatus": "Listening",
      "speakingStatus": "Talk to interrupt",
      "startCall": "Start a call"
    },
    "vad": {
      "prefix_padding_ms": 500,
      "silence_duration_ms": 1000,
      "threshold": 0.8
    },
    "voice": "shimmer"
  }
}

Headers

x-api-key
string
Example:

"15a23c21867f4f38b0b46f5e4adb1caf87a040b34eb58f68"

Path Parameters

chatbotId
string
required
Example:

"3317853e-0af2-427d-a56f-351a9587f48f"

Body

application/json
agentId
string
Example:

"5afe16ed-5fd2-4552-a993-903bc9c32bb6"

appearance
object
avatar
object
model
object
text
object
vad
object
voice
string
Example:

"shimmer"

Response

200 - application/json
Example
message
string
Example:

"Voice widget config updated successfully"

voice_widget_config
object