API Reference
Voice Agent
API Documentation
API Reference
- POSTKnowledge Base Files
- GETGet Chatbots
- POSTCreate Chatbot
- PATCHUpdate Chatbot
- GETGet Chatbot Details
- DELDelete Chatbot
- PATCHChatbot Avatar
- PATCHVoice Agent
- PATCHChat Widget
- GETGet Knowledge Base List Of Chatbot
- DELDelete Knowledge Base Data
- PATCHUpdate Knowledge Base
- POSTQuery Knowledge
- POSTChat
- GETGet A Conversation
- GETGet Conversations
- GETGet Messages
API Reference
Voice Agent
Voice Agent
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
Example:
"15a23c21867f4f38b0b46f5e4adb1caf87a040b34eb58f68"
Path Parameters
Example:
"3317853e-0af2-427d-a56f-351a9587f48f"
Body
application/json
Example:
"5afe16ed-5fd2-4552-a993-903bc9c32bb6"
Example:
"#ffffff"
Example:
"#e1e1e1"
Example:
"#000000"
Example:
32
Example:
"#ffffff"
Example:
20
Example:
"#000000"
Example:
"#000000"
Example:
"https://assets.grok.com/users/e473c4f6-e103-4d71-8194-03a7ecc74370/0R8nPXaAvhBinoUh-generated_image.jpg"
Example:
"shimmer"
Response
200 - application/json
Example
Example:
"Voice widget config updated successfully"
Example:
"5afe16ed-5fd2-4552-a993-903bc9c32bb6"
Example:
"#ffffff"
Example:
"#e1e1e1"
Example:
"#000000"
Example:
32
Example:
"#ffffff"
Example:
20
Example:
"#000000"
Example:
"#000000"
Example:
"https://assets.grok.com/users/e473c4f6-e103-4d71-8194-03a7ecc74370/0R8nPXaAvhBinoUh-generated_image.jpg"
Example:
"Appointment?"
Example:
"End"
Example:
"Listening"
Example:
"Talk to interrupt"
Example:
"Start a call"
Example:
"shimmer"
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"
}
}