curl --request PATCH \
--url https://api.openmic.ai/v1/bots/{uid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Updated Customer Support Bot",
"prompt": "You are an advanced customer support assistant with expertise in technical issues.",
"voice_speed": 1.1,
"llm_model_temperature": 0.8,
"call_settings": {
"max_call_duration": 15,
"silence_timeout": 20,
"voicemail_detection_enabled": true,
"voicemail_action": "leave_message",
"voicemail_message_type": "prompt",
"voicemail_message": "Generate a voicemail explaining why I called based on the customer's recent support ticket."
}
}
EOFimport requests
url = "https://api.openmic.ai/v1/bots/{uid}"
payload = {
"name": "Updated Customer Support Bot",
"prompt": "You are an advanced customer support assistant with expertise in technical issues.",
"voice_speed": 1.1,
"llm_model_temperature": 0.8,
"call_settings": {
"max_call_duration": 15,
"silence_timeout": 20,
"voicemail_detection_enabled": True,
"voicemail_action": "leave_message",
"voicemail_message_type": "prompt",
"voicemail_message": "Generate a voicemail explaining why I called based on the customer's recent support ticket."
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated Customer Support Bot',
prompt: 'You are an advanced customer support assistant with expertise in technical issues.',
voice_speed: 1.1,
llm_model_temperature: 0.8,
call_settings: {
max_call_duration: 15,
silence_timeout: 20,
voicemail_detection_enabled: true,
voicemail_action: 'leave_message',
voicemail_message_type: 'prompt',
voicemail_message: 'Generate a voicemail explaining why I called based on the customer\'s recent support ticket.'
}
})
};
fetch('https://api.openmic.ai/v1/bots/{uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openmic.ai/v1/bots/{uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Customer Support Bot',
'prompt' => 'You are an advanced customer support assistant with expertise in technical issues.',
'voice_speed' => 1.1,
'llm_model_temperature' => 0.8,
'call_settings' => [
'max_call_duration' => 15,
'silence_timeout' => 20,
'voicemail_detection_enabled' => true,
'voicemail_action' => 'leave_message',
'voicemail_message_type' => 'prompt',
'voicemail_message' => 'Generate a voicemail explaining why I called based on the customer\'s recent support ticket.'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openmic.ai/v1/bots/{uid}"
payload := strings.NewReader("{\n \"name\": \"Updated Customer Support Bot\",\n \"prompt\": \"You are an advanced customer support assistant with expertise in technical issues.\",\n \"voice_speed\": 1.1,\n \"llm_model_temperature\": 0.8,\n \"call_settings\": {\n \"max_call_duration\": 15,\n \"silence_timeout\": 20,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"prompt\",\n \"voicemail_message\": \"Generate a voicemail explaining why I called based on the customer's recent support ticket.\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.openmic.ai/v1/bots/{uid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Customer Support Bot\",\n \"prompt\": \"You are an advanced customer support assistant with expertise in technical issues.\",\n \"voice_speed\": 1.1,\n \"llm_model_temperature\": 0.8,\n \"call_settings\": {\n \"max_call_duration\": 15,\n \"silence_timeout\": 20,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"prompt\",\n \"voicemail_message\": \"Generate a voicemail explaining why I called based on the customer's recent support ticket.\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openmic.ai/v1/bots/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Customer Support Bot\",\n \"prompt\": \"You are an advanced customer support assistant with expertise in technical issues.\",\n \"voice_speed\": 1.1,\n \"llm_model_temperature\": 0.8,\n \"call_settings\": {\n \"max_call_duration\": 15,\n \"silence_timeout\": 20,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"prompt\",\n \"voicemail_message\": \"Generate a voicemail explaining why I called based on the customer's recent support ticket.\"\n }\n}"
response = http.request(request)
puts response.read_body{
"uid": "<string>",
"name": "<string>",
"prompt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"auto_first_message": true,
"first_message": "<string>",
"knowledge_base_id": 123,
"voice": "<string>",
"voice_model": "<string>",
"voice_speed": 123,
"llm_model_name": "<string>",
"llm_model_temperature": 123,
"stt_provider": "Deepgram",
"stt_model": "<string>",
"call_settings": {
"max_call_duration": 16,
"silence_timeout": 25,
"silence_timeout_max_retries": 3,
"silence_timeout_message": "<string>",
"call_recording_enabled": true,
"voicemail_detection_enabled": true,
"voicemail_message": "<string>",
"hipaa_compliance_enabled": true,
"pci_compliance_enabled": true
},
"advanced_settings": {
"humanize_conversation": true,
"background_noise_reduction": true,
"allow_interruptions": true,
"min_interruption_duration": 2.6,
"background_sound": "<string>",
"short_pause": 1.1,
"long_pause": 3.25,
"filter_phrases": "<string>"
},
"post_call_settings": {
"summary_prompt": "<string>",
"success_evaluation_prompt": "<string>",
"structured_extraction_prompt": "<string>",
"structured_extraction_json_schema": {}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Update Bot
Update an existing bot’s configuration.
curl --request PATCH \
--url https://api.openmic.ai/v1/bots/{uid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Updated Customer Support Bot",
"prompt": "You are an advanced customer support assistant with expertise in technical issues.",
"voice_speed": 1.1,
"llm_model_temperature": 0.8,
"call_settings": {
"max_call_duration": 15,
"silence_timeout": 20,
"voicemail_detection_enabled": true,
"voicemail_action": "leave_message",
"voicemail_message_type": "prompt",
"voicemail_message": "Generate a voicemail explaining why I called based on the customer's recent support ticket."
}
}
EOFimport requests
url = "https://api.openmic.ai/v1/bots/{uid}"
payload = {
"name": "Updated Customer Support Bot",
"prompt": "You are an advanced customer support assistant with expertise in technical issues.",
"voice_speed": 1.1,
"llm_model_temperature": 0.8,
"call_settings": {
"max_call_duration": 15,
"silence_timeout": 20,
"voicemail_detection_enabled": True,
"voicemail_action": "leave_message",
"voicemail_message_type": "prompt",
"voicemail_message": "Generate a voicemail explaining why I called based on the customer's recent support ticket."
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated Customer Support Bot',
prompt: 'You are an advanced customer support assistant with expertise in technical issues.',
voice_speed: 1.1,
llm_model_temperature: 0.8,
call_settings: {
max_call_duration: 15,
silence_timeout: 20,
voicemail_detection_enabled: true,
voicemail_action: 'leave_message',
voicemail_message_type: 'prompt',
voicemail_message: 'Generate a voicemail explaining why I called based on the customer\'s recent support ticket.'
}
})
};
fetch('https://api.openmic.ai/v1/bots/{uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openmic.ai/v1/bots/{uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Customer Support Bot',
'prompt' => 'You are an advanced customer support assistant with expertise in technical issues.',
'voice_speed' => 1.1,
'llm_model_temperature' => 0.8,
'call_settings' => [
'max_call_duration' => 15,
'silence_timeout' => 20,
'voicemail_detection_enabled' => true,
'voicemail_action' => 'leave_message',
'voicemail_message_type' => 'prompt',
'voicemail_message' => 'Generate a voicemail explaining why I called based on the customer\'s recent support ticket.'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openmic.ai/v1/bots/{uid}"
payload := strings.NewReader("{\n \"name\": \"Updated Customer Support Bot\",\n \"prompt\": \"You are an advanced customer support assistant with expertise in technical issues.\",\n \"voice_speed\": 1.1,\n \"llm_model_temperature\": 0.8,\n \"call_settings\": {\n \"max_call_duration\": 15,\n \"silence_timeout\": 20,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"prompt\",\n \"voicemail_message\": \"Generate a voicemail explaining why I called based on the customer's recent support ticket.\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.openmic.ai/v1/bots/{uid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Customer Support Bot\",\n \"prompt\": \"You are an advanced customer support assistant with expertise in technical issues.\",\n \"voice_speed\": 1.1,\n \"llm_model_temperature\": 0.8,\n \"call_settings\": {\n \"max_call_duration\": 15,\n \"silence_timeout\": 20,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"prompt\",\n \"voicemail_message\": \"Generate a voicemail explaining why I called based on the customer's recent support ticket.\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openmic.ai/v1/bots/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Customer Support Bot\",\n \"prompt\": \"You are an advanced customer support assistant with expertise in technical issues.\",\n \"voice_speed\": 1.1,\n \"llm_model_temperature\": 0.8,\n \"call_settings\": {\n \"max_call_duration\": 15,\n \"silence_timeout\": 20,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"prompt\",\n \"voicemail_message\": \"Generate a voicemail explaining why I called based on the customer's recent support ticket.\"\n }\n}"
response = http.request(request)
puts response.read_body{
"uid": "<string>",
"name": "<string>",
"prompt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"auto_first_message": true,
"first_message": "<string>",
"knowledge_base_id": 123,
"voice": "<string>",
"voice_model": "<string>",
"voice_speed": 123,
"llm_model_name": "<string>",
"llm_model_temperature": 123,
"stt_provider": "Deepgram",
"stt_model": "<string>",
"call_settings": {
"max_call_duration": 16,
"silence_timeout": 25,
"silence_timeout_max_retries": 3,
"silence_timeout_message": "<string>",
"call_recording_enabled": true,
"voicemail_detection_enabled": true,
"voicemail_message": "<string>",
"hipaa_compliance_enabled": true,
"pci_compliance_enabled": true
},
"advanced_settings": {
"humanize_conversation": true,
"background_noise_reduction": true,
"allow_interruptions": true,
"min_interruption_duration": 2.6,
"background_sound": "<string>",
"short_pause": 1.1,
"long_pause": 3.25,
"filter_phrases": "<string>"
},
"post_call_settings": {
"summary_prompt": "<string>",
"success_evaluation_prompt": "<string>",
"structured_extraction_prompt": "<string>",
"structured_extraction_json_schema": {}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Bearer token authentication using API key. Find it at: https://chat.openmic.ai/api-key
Path Parameters
The unique identifier of the bot
Body
Updated bot configuration
All fields are optional for updates
Name of the bot (max 255 characters)
255System prompt for the bot
Whether to automatically send the first message when the call starts.
Initial message the bot will send.
ID of the knowledge base to use
Voice synthesis provider
OpenAI, ElevenLabs, Deepgram Voice ID or name
Voice model to use
Speech speed multiplier
Large language model to use
Temperature setting for the LLM
Speech-to-text provider
Deepgram Speech-to-text model
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Bot updated successfully
Unique identifier of the bot
Name of the bot
System prompt for the bot
Bot creation timestamp
Bot last update timestamp
Whether to automatically send the first message when the call starts
Initial message the bot will send
ID of the knowledge base
Voice synthesis provider
OpenAI, ElevenLabs, Deepgram Voice ID or name
Voice model being used
Speech speed multiplier
Large language model being used
Temperature setting for the LLM
Speech-to-text provider
Deepgram Speech-to-text model
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?