Agents
Get an agent
Returns a single agent by ID.
GET
/
agent
/
{id}
Get an agent
curl --request GET \
--url https://api.vocobase.com/api/v2/agent/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vocobase.com/api/v2/agent/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vocobase.com/api/v2/agent/{id}', 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.vocobase.com/api/v2/agent/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vocobase.com/api/v2/agent/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vocobase.com/api/v2/agent/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/agent/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "<string>",
"prompt": "<string>",
"voice_id": "<string>",
"language": "<string>",
"intro_message": "<string>",
"voicemail_detection_enabled": true,
"screener_handling_enabled": true,
"voicemail_message": "<string>",
"enable_recording": true,
"kb_include_summaries": true,
"kb_result_format": "<string>",
"kb_enable_llm_processing": true,
"kb_llm_system_prompt": "<string>",
"variables": [
"<string>"
],
"extraction_config": {
"prompt": "<string>",
"keys": [
{
"name": "<string>",
"description": "<string>"
}
],
"includeToolLogs": false
},
"tool_ack_config": {
"enabled": true,
"maxWords": 100
},
"extraction_enabled": true,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_enabled": true,
"transfer_number": "<string>",
"transfer_message": "<string>",
"transfer_instructions": "<string>",
"end_call_enabled": true,
"end_call_message": "<string>",
"end_call_instructions": "<string>",
"user_idle_enabled": true,
"max_call_duration_secs": 600,
"background_audio_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"background_audio_volume": 0.5,
"document_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}Previous
Update an agentUpdates one or more agent fields. Only provided fields are changed. At least one field must be provided.
Next
⌘I
Get an agent
curl --request GET \
--url https://api.vocobase.com/api/v2/agent/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vocobase.com/api/v2/agent/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vocobase.com/api/v2/agent/{id}', 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.vocobase.com/api/v2/agent/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vocobase.com/api/v2/agent/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vocobase.com/api/v2/agent/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/agent/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "<string>",
"prompt": "<string>",
"voice_id": "<string>",
"language": "<string>",
"intro_message": "<string>",
"voicemail_detection_enabled": true,
"screener_handling_enabled": true,
"voicemail_message": "<string>",
"enable_recording": true,
"kb_include_summaries": true,
"kb_result_format": "<string>",
"kb_enable_llm_processing": true,
"kb_llm_system_prompt": "<string>",
"variables": [
"<string>"
],
"extraction_config": {
"prompt": "<string>",
"keys": [
{
"name": "<string>",
"description": "<string>"
}
],
"includeToolLogs": false
},
"tool_ack_config": {
"enabled": true,
"maxWords": 100
},
"extraction_enabled": true,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_enabled": true,
"transfer_number": "<string>",
"transfer_message": "<string>",
"transfer_instructions": "<string>",
"end_call_enabled": true,
"end_call_message": "<string>",
"end_call_instructions": "<string>",
"user_idle_enabled": true,
"max_call_duration_secs": 600,
"background_audio_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"background_audio_volume": 0.5,
"document_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}