Get All Agents
curl --request GET \
--url https://api.getmalakai.com/agents/user \
--header 'Authorization: <authorization>' \
--header 'x-access-token: <x-access-token>'import requests
url = "https://api.getmalakai.com/agents/user"
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'x-access-token': '<x-access-token>'}
};
fetch('https://api.getmalakai.com/agents/user', 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.getmalakai.com/agents/user",
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: <authorization>",
"x-access-token: <x-access-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.getmalakai.com/agents/user"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-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.getmalakai.com/agents/user")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/agents/user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
response = http.request(request)
puts response.read_body{
"responseCode": 2000,
"message": "Agents fetched successfully",
"data": [
{
"id": "***",
"agent_name": "Andrew Hamilton",
"voice_id": "***",
"language": "***",
"template_id": null,
"conversation": null,
"user_id": "***",
"opening_message": "Thank you for calling. How can I assist you today?",
"qualification_scenario": "The caller needs to be transferred to the appropriate department based on their request.",
"goals": "Determine which department the caller needs to be transferred to and complete the transfer efficiently.",
"background": "The agent should be familiar with the different departments and their responsibilities in order to direct the caller to the right place.",
"example_scenario": "Agent: Thank you for calling. How can I assist you today? Caller: I need to speak with someone in the sales department. Agent: Okay, let me transfer you to our sales department. One moment please. [Transfer to sales department]",
"img_url": "",
"negative_prompt": "none",
"created_at": "***",
"updated_at": "***"
}
]
}
Agents
Get All Agents
Retrieve a list of all existing agents.
GET
agents
/
user
Get All Agents
curl --request GET \
--url https://api.getmalakai.com/agents/user \
--header 'Authorization: <authorization>' \
--header 'x-access-token: <x-access-token>'import requests
url = "https://api.getmalakai.com/agents/user"
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'x-access-token': '<x-access-token>'}
};
fetch('https://api.getmalakai.com/agents/user', 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.getmalakai.com/agents/user",
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: <authorization>",
"x-access-token: <x-access-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.getmalakai.com/agents/user"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-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.getmalakai.com/agents/user")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/agents/user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
response = http.request(request)
puts response.read_body{
"responseCode": 2000,
"message": "Agents fetched successfully",
"data": [
{
"id": "***",
"agent_name": "Andrew Hamilton",
"voice_id": "***",
"language": "***",
"template_id": null,
"conversation": null,
"user_id": "***",
"opening_message": "Thank you for calling. How can I assist you today?",
"qualification_scenario": "The caller needs to be transferred to the appropriate department based on their request.",
"goals": "Determine which department the caller needs to be transferred to and complete the transfer efficiently.",
"background": "The agent should be familiar with the different departments and their responsibilities in order to direct the caller to the right place.",
"example_scenario": "Agent: Thank you for calling. How can I assist you today? Caller: I need to speak with someone in the sales department. Agent: Okay, let me transfer you to our sales department. One moment please. [Transfer to sales department]",
"img_url": "",
"negative_prompt": "none",
"created_at": "***",
"updated_at": "***"
}
]
}
Headers
string
required
Your API key for authentication. Prefix with
Bearer .string
required
Your access token for authentication.
Response
object[]
An array containing all agent objects.
string
The unique identifier for the agent.
string
The full name of the agent.
string
The voice that the agent will use.
string
The language in which the agent will speak
{
"responseCode": 2000,
"message": "Agents fetched successfully",
"data": [
{
"id": "***",
"agent_name": "Andrew Hamilton",
"voice_id": "***",
"language": "***",
"template_id": null,
"conversation": null,
"user_id": "***",
"opening_message": "Thank you for calling. How can I assist you today?",
"qualification_scenario": "The caller needs to be transferred to the appropriate department based on their request.",
"goals": "Determine which department the caller needs to be transferred to and complete the transfer efficiently.",
"background": "The agent should be familiar with the different departments and their responsibilities in order to direct the caller to the right place.",
"example_scenario": "Agent: Thank you for calling. How can I assist you today? Caller: I need to speak with someone in the sales department. Agent: Okay, let me transfer you to our sales department. One moment please. [Transfer to sales department]",
"img_url": "",
"negative_prompt": "none",
"created_at": "***",
"updated_at": "***"
}
]
}
⌘I