curl --request POST \
--url https://server.sellagent.ai/api/agent/create \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"name": "Appointement Setter Agent"
}
'import requests
url = "https://server.sellagent.ai/api/agent/create"
payload = { "name": "Appointement Setter Agent" }
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({name: 'Appointement Setter Agent'})
};
fetch('https://server.sellagent.ai/api/agent/create', 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://server.sellagent.ai/api/agent/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Appointement Setter Agent'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-api-key>"
],
]);
$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://server.sellagent.ai/api/agent/create"
payload := strings.NewReader("{\n \"name\": \"Appointement Setter Agent\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://server.sellagent.ai/api/agent/create")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"name\": \"Appointement Setter Agent\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.sellagent.ai/api/agent/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"name\": \"Appointement Setter Agent\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "686679f702bfb2054ec3d1f0",
"name": "Appointement Setter Agent",
"type": "Single Prompt",
"firstMessage": "Hello, how can I help you today?",
"modelType": "deepseek/deepseek-chat-v3-0324",
"backgroundSound": {
"volume": 30
},
"dynamicVariables": {
"first_name": "John"
},
"webhookURL": "Url endpoint",
"language": {
"code": "en",
"label": "English",
"icon": "US"
},
"customFunctions": [
"<unknown>"
],
"voiceMailDetection": false,
"silenceThreshold": 30,
"maxCallDuration": 300,
"pauseBeforeSpeaking": 0,
"enableRecording": false,
"enableTranscript": false,
"providerId": "105922657181422688240",
"currentWorkspace": "685846b162e555e53cd3aeaa",
"creditsBalance": 0,
"currentSubscription": {
"status": "free",
"stripeCustomerId": "cus_SarEyKO1v9KQfP"
},
"usageMetrics": {
"callingMinutesUsed": 0,
"contactsUploaded": 0,
"emailsSent": 0,
"lastResetDate": "2025-06-29T16:37:16.234Z",
"currentPeriodUsage": {
"callingMinutes": 0,
"contacts": 0,
"emails": 0
}
},
"workspaceId": "685846b162e555e53cd3aeaa",
"modelId": {
"_id": "68243c0eba21403731844a8c",
"provider": "OpenRouter",
"label": "DeepSeek V3",
"type": "text",
"currency": "USD",
"icon": "https://assets-seleagent.s3.us-east-2.amazonaws.com/deepseek.png",
"modelName": "deepseek/deepseek-chat-v3-0324",
"cost": 0.01,
"latency": 400
},
"voiceId": {
"_id": "6800a813e6052d216985b6eb",
"voiceName": "Luna",
"accent": "English (US)",
"gender": "Female",
"voiceId": "aura-2-luna-en",
"demoUrl": "https://d2z4jjzwkquvhw.cloudfront.net/Luna.wav",
"voiceImg": "https://img.freepik.com/...jpg",
"voiceProvider": "Deepgram",
"providerId": "68243c0eba21403731844a8a",
"voiceKey": "aura-2-luna-en"
},
"knowledgeBase": [
"<unknown>"
],
"createdAt": "2025-07-03T12:39:19.318Z",
"updatedAt": "2025-07-04T20:39:32.968Z",
"script": "Agent Script"
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Create Agent
Creates a new voice AI agent in the system.
curl --request POST \
--url https://server.sellagent.ai/api/agent/create \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"name": "Appointement Setter Agent"
}
'import requests
url = "https://server.sellagent.ai/api/agent/create"
payload = { "name": "Appointement Setter Agent" }
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({name: 'Appointement Setter Agent'})
};
fetch('https://server.sellagent.ai/api/agent/create', 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://server.sellagent.ai/api/agent/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Appointement Setter Agent'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-api-key>"
],
]);
$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://server.sellagent.ai/api/agent/create"
payload := strings.NewReader("{\n \"name\": \"Appointement Setter Agent\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://server.sellagent.ai/api/agent/create")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"name\": \"Appointement Setter Agent\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.sellagent.ai/api/agent/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"name\": \"Appointement Setter Agent\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "686679f702bfb2054ec3d1f0",
"name": "Appointement Setter Agent",
"type": "Single Prompt",
"firstMessage": "Hello, how can I help you today?",
"modelType": "deepseek/deepseek-chat-v3-0324",
"backgroundSound": {
"volume": 30
},
"dynamicVariables": {
"first_name": "John"
},
"webhookURL": "Url endpoint",
"language": {
"code": "en",
"label": "English",
"icon": "US"
},
"customFunctions": [
"<unknown>"
],
"voiceMailDetection": false,
"silenceThreshold": 30,
"maxCallDuration": 300,
"pauseBeforeSpeaking": 0,
"enableRecording": false,
"enableTranscript": false,
"providerId": "105922657181422688240",
"currentWorkspace": "685846b162e555e53cd3aeaa",
"creditsBalance": 0,
"currentSubscription": {
"status": "free",
"stripeCustomerId": "cus_SarEyKO1v9KQfP"
},
"usageMetrics": {
"callingMinutesUsed": 0,
"contactsUploaded": 0,
"emailsSent": 0,
"lastResetDate": "2025-06-29T16:37:16.234Z",
"currentPeriodUsage": {
"callingMinutes": 0,
"contacts": 0,
"emails": 0
}
},
"workspaceId": "685846b162e555e53cd3aeaa",
"modelId": {
"_id": "68243c0eba21403731844a8c",
"provider": "OpenRouter",
"label": "DeepSeek V3",
"type": "text",
"currency": "USD",
"icon": "https://assets-seleagent.s3.us-east-2.amazonaws.com/deepseek.png",
"modelName": "deepseek/deepseek-chat-v3-0324",
"cost": 0.01,
"latency": 400
},
"voiceId": {
"_id": "6800a813e6052d216985b6eb",
"voiceName": "Luna",
"accent": "English (US)",
"gender": "Female",
"voiceId": "aura-2-luna-en",
"demoUrl": "https://d2z4jjzwkquvhw.cloudfront.net/Luna.wav",
"voiceImg": "https://img.freepik.com/...jpg",
"voiceProvider": "Deepgram",
"providerId": "68243c0eba21403731844a8a",
"voiceKey": "aura-2-luna-en"
},
"knowledgeBase": [
"<unknown>"
],
"createdAt": "2025-07-03T12:39:19.318Z",
"updatedAt": "2025-07-04T20:39:32.968Z",
"script": "Agent Script"
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Headers
Your API key for authentication
Must be application/json
application/json Optional workspace ID (defaults to user's current workspace)
Body
Name of the agent to be created
"Appointement Setter Agent"
Response
Agent created successfully
Unique ID of the agent
"686679f702bfb2054ec3d1f0"
Name of the agent
"Appointement Setter Agent"
Agent type (e.g., Single Prompt, Multi-Step)
"Single Prompt"
Initial message spoken by the agent
"Hello, how can I help you today?"
Model used by the agent
"deepseek/deepseek-chat-v3-0324"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Model used by the agent
"Url endpoint"
Show child attributes
Show child attributes
Custom functions used in the agent
false
30
300
0
false
false
"105922657181422688240"
"685846b162e555e53cd3aeaa"
0
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"685846b162e555e53cd3aeaa"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Knowledge base entries attached to the agent
"2025-07-03T12:39:19.318Z"
"2025-07-04T20:39:32.968Z"
"Agent Script"
