Get Agent
curl --request GET \
--url https://sa.dialgen.ai/api/v1/agent \
--header 'Authorization: Bearer <token>'import requests
url = "https://sa.dialgen.ai/api/v1/agent"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sa.dialgen.ai/api/v1/agent', 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://sa.dialgen.ai/api/v1/agent",
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://sa.dialgen.ai/api/v1/agent"
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://sa.dialgen.ai/api/v1/agent")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sa.dialgen.ai/api/v1/agent")
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{
"id": "agent_clx123abc...",
"name": "Customer Support Agent",
"createdAt": "2025-10-01T10:00:00.000Z",
"updatedAt": "2025-10-05T14:30:00.000Z",
"type": "OUTBOUND",
"isActive": true,
"basicDetails": {
"dialId": "Dial2",
"voiceId": "",
"agent_name": "",
"voiceSpeed": 0.7,
"voiceGender": "male",
"agentLanguage": "en"
},
"metricConfig": {
"enabled": true,
"customMetrics": []
},
"sipTrunkId": "sip_789"
}{
"error": "Bad Request",
"message": "Missing required parameter"
}{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}{
"error": "Forbidden",
"message": "Access denied"
}{
"error": "Not Found",
"message": "Resource not found"
}{
"error": "Internal Server Error",
"message": "An unexpected error occurred"
}Agents
Get Agent
Retrieves the configuration and details for a specific AI agent. This includes basic information, active status, and metric configurations.
GET
/
api
/
v1
/
agent
Get Agent
curl --request GET \
--url https://sa.dialgen.ai/api/v1/agent \
--header 'Authorization: Bearer <token>'import requests
url = "https://sa.dialgen.ai/api/v1/agent"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sa.dialgen.ai/api/v1/agent', 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://sa.dialgen.ai/api/v1/agent",
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://sa.dialgen.ai/api/v1/agent"
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://sa.dialgen.ai/api/v1/agent")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sa.dialgen.ai/api/v1/agent")
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{
"id": "agent_clx123abc...",
"name": "Customer Support Agent",
"createdAt": "2025-10-01T10:00:00.000Z",
"updatedAt": "2025-10-05T14:30:00.000Z",
"type": "OUTBOUND",
"isActive": true,
"basicDetails": {
"dialId": "Dial2",
"voiceId": "",
"agent_name": "",
"voiceSpeed": 0.7,
"voiceGender": "male",
"agentLanguage": "en"
},
"metricConfig": {
"enabled": true,
"customMetrics": []
},
"sipTrunkId": "sip_789"
}{
"error": "Bad Request",
"message": "Missing required parameter"
}{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}{
"error": "Forbidden",
"message": "Access denied"
}{
"error": "Not Found",
"message": "Resource not found"
}{
"error": "Internal Server Error",
"message": "An unexpected error occurred"
}Authorizations
Bearer token authentication. Obtain your API key from the Dialgen API Keys dashboard at https://sa.dialgen.ai/api-keys
Query Parameters
The unique identifier of the agent
Example:
"agent_clx123abc..."
The user ID owning the agent
Example:
"user_clx456def..."
Response
Agent details retrieved successfully
Unique agent identifier
Agent name
Agent creation timestamp
Agent last update timestamp
Agent type
Available options:
OUTBOUND, INBOUND Whether the agent is active
Show child attributes
Show child attributes
Show child attributes
Show child attributes
SIP trunk identifier