Agents
List Agents
List the agents in your workspace on the v1 API.
GET
/
v1
/
agents
List Agents
curl --request GET \
--url https://api.dialnexa.com/v1/agents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dialnexa.com/v1/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dialnexa.com/v1/agents', 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.dialnexa.com/v1/agents",
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.dialnexa.com/v1/agents"
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.dialnexa.com/v1/agents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dialnexa.com/v1/agents")
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{
"agents": [
{
"id": "agent_2g7Xy3tY53gRlp",
"folder_id": null,
"current_version_number": 1,
"timezone": "Asia/Kolkata",
"agent_type": "Single_Prompt_Agent",
"pipeline_type": "Cascaded",
"webhook_id": null,
"current_version": {
"agent_id": "agent_2g7Xy3tY53gRlp",
"version_number": 1,
"version_title": "Version 1",
"title": "Customer Support Agent",
"is_published": false,
"language_id": "lang_en_in",
"voice_id": "voice_abc123",
"llm_id": "llm_A1B2C3D4E5F6G7",
"transcriber_id": "trs_deepgram_nova_2",
"fallback_stt_enabled": true,
"stt_fallback_transcriber_id": "trs_soniox",
"post_call_analysis_llm_id": "llm_A1B2C3D4E5F6G7"
},
"versions": [
{
"agent_id": "agent_2g7Xy3tY53gRlp",
"version_number": 1,
"version_title": "Version 1",
"title": "Customer Support Agent",
"is_published": false,
"language_id": "lang_en_in",
"voice_id": "voice_abc123",
"llm_id": "llm_A1B2C3D4E5F6G7",
"transcriber_id": "trs_deepgram_nova_2",
"fallback_stt_enabled": true,
"stt_fallback_transcriber_id": "trs_soniox",
"post_call_analysis_llm_id": "llm_A1B2C3D4E5F6G7"
}
]
}
]
}{
"statusCode": 400,
"message": "Invalid query parameters",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "API key is missing or invalid",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "You do not have permission to access this resource",
"error": "Forbidden"
}{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error"
}Read only
Return the agents that belong to the authenticated organization. Use this to populate a picker in your own UI or to find an agent’s
id before fetching or updating it.
When to use this
- Agent pickers: populate a dropdown of available agents in your own tooling.
- ID lookup: find an agent’s
idby title before calling Get Agent Details or Update Agent. - Inventory checks: audit which agents exist in a workspace, for example before cleaning up unused ones with Delete Agent.
agents array without pagination metadata; the full list is returned in one response. See Pagination for how each list endpoint shapes its response.Was this page helpful?
⌘I
List Agents
curl --request GET \
--url https://api.dialnexa.com/v1/agents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dialnexa.com/v1/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dialnexa.com/v1/agents', 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.dialnexa.com/v1/agents",
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.dialnexa.com/v1/agents"
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.dialnexa.com/v1/agents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dialnexa.com/v1/agents")
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{
"agents": [
{
"id": "agent_2g7Xy3tY53gRlp",
"folder_id": null,
"current_version_number": 1,
"timezone": "Asia/Kolkata",
"agent_type": "Single_Prompt_Agent",
"pipeline_type": "Cascaded",
"webhook_id": null,
"current_version": {
"agent_id": "agent_2g7Xy3tY53gRlp",
"version_number": 1,
"version_title": "Version 1",
"title": "Customer Support Agent",
"is_published": false,
"language_id": "lang_en_in",
"voice_id": "voice_abc123",
"llm_id": "llm_A1B2C3D4E5F6G7",
"transcriber_id": "trs_deepgram_nova_2",
"fallback_stt_enabled": true,
"stt_fallback_transcriber_id": "trs_soniox",
"post_call_analysis_llm_id": "llm_A1B2C3D4E5F6G7"
},
"versions": [
{
"agent_id": "agent_2g7Xy3tY53gRlp",
"version_number": 1,
"version_title": "Version 1",
"title": "Customer Support Agent",
"is_published": false,
"language_id": "lang_en_in",
"voice_id": "voice_abc123",
"llm_id": "llm_A1B2C3D4E5F6G7",
"transcriber_id": "trs_deepgram_nova_2",
"fallback_stt_enabled": true,
"stt_fallback_transcriber_id": "trs_soniox",
"post_call_analysis_llm_id": "llm_A1B2C3D4E5F6G7"
}
]
}
]
}{
"statusCode": 400,
"message": "Invalid query parameters",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "API key is missing or invalid",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "You do not have permission to access this resource",
"error": "Forbidden"
}{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error"
}