Create Agent
Creates a new agent within the specified organization with the given configuration, including extensions and call event hooks.
curl --request POST \
--url https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sales Bot Alpha",
"userValueTypes": {
"customer_name": "STRING",
"product_interest": "STRING",
"order_id": "NUMBER"
},
"systemPromptTemplate": "You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.",
"telephoneNumberId": "11223344-5566-7788-9900-aabbccddeeff",
"llmAudioContentGenerationStrategyId": "abcdef01-2345-6789-abcd-ef0123456789",
"extensions": [
{
"type": "crm_lookup_v1",
"parameters": {
"crm_system_url": "https://mycrm.example.com/api",
"api_key_secret": "secret_crm_key"
}
}
],
"callEventHooks": [
{
"type": "webhook_call_ended_v1",
"parameters": {
"target_url": "https://my.service.com/call_event",
"auth_token": "bearer_abc123"
}
}
]
}
'import requests
url = "https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents"
payload = {
"name": "Sales Bot Alpha",
"userValueTypes": {
"customer_name": "STRING",
"product_interest": "STRING",
"order_id": "NUMBER"
},
"systemPromptTemplate": "You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.",
"telephoneNumberId": "11223344-5566-7788-9900-aabbccddeeff",
"llmAudioContentGenerationStrategyId": "abcdef01-2345-6789-abcd-ef0123456789",
"extensions": [
{
"type": "crm_lookup_v1",
"parameters": {
"crm_system_url": "https://mycrm.example.com/api",
"api_key_secret": "secret_crm_key"
}
}
],
"callEventHooks": [
{
"type": "webhook_call_ended_v1",
"parameters": {
"target_url": "https://my.service.com/call_event",
"auth_token": "bearer_abc123"
}
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sales Bot Alpha',
userValueTypes: {customer_name: 'STRING', product_interest: 'STRING', order_id: 'NUMBER'},
systemPromptTemplate: 'You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.',
telephoneNumberId: '11223344-5566-7788-9900-aabbccddeeff',
llmAudioContentGenerationStrategyId: 'abcdef01-2345-6789-abcd-ef0123456789',
extensions: [
{
type: 'crm_lookup_v1',
parameters: {
crm_system_url: 'https://mycrm.example.com/api',
api_key_secret: 'secret_crm_key'
}
}
],
callEventHooks: [
{
type: 'webhook_call_ended_v1',
parameters: {target_url: 'https://my.service.com/call_event', auth_token: 'bearer_abc123'}
}
]
})
};
fetch('https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/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://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents",
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' => 'Sales Bot Alpha',
'userValueTypes' => [
'customer_name' => 'STRING',
'product_interest' => 'STRING',
'order_id' => 'NUMBER'
],
'systemPromptTemplate' => 'You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.',
'telephoneNumberId' => '11223344-5566-7788-9900-aabbccddeeff',
'llmAudioContentGenerationStrategyId' => 'abcdef01-2345-6789-abcd-ef0123456789',
'extensions' => [
[
'type' => 'crm_lookup_v1',
'parameters' => [
'crm_system_url' => 'https://mycrm.example.com/api',
'api_key_secret' => 'secret_crm_key'
]
]
],
'callEventHooks' => [
[
'type' => 'webhook_call_ended_v1',
'parameters' => [
'target_url' => 'https://my.service.com/call_event',
'auth_token' => 'bearer_abc123'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents"
payload := strings.NewReader("{\n \"name\": \"Sales Bot Alpha\",\n \"userValueTypes\": {\n \"customer_name\": \"STRING\",\n \"product_interest\": \"STRING\",\n \"order_id\": \"NUMBER\"\n },\n \"systemPromptTemplate\": \"You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.\",\n \"telephoneNumberId\": \"11223344-5566-7788-9900-aabbccddeeff\",\n \"llmAudioContentGenerationStrategyId\": \"abcdef01-2345-6789-abcd-ef0123456789\",\n \"extensions\": [\n {\n \"type\": \"crm_lookup_v1\",\n \"parameters\": {\n \"crm_system_url\": \"https://mycrm.example.com/api\",\n \"api_key_secret\": \"secret_crm_key\"\n }\n }\n ],\n \"callEventHooks\": [\n {\n \"type\": \"webhook_call_ended_v1\",\n \"parameters\": {\n \"target_url\": \"https://my.service.com/call_event\",\n \"auth_token\": \"bearer_abc123\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sales Bot Alpha\",\n \"userValueTypes\": {\n \"customer_name\": \"STRING\",\n \"product_interest\": \"STRING\",\n \"order_id\": \"NUMBER\"\n },\n \"systemPromptTemplate\": \"You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.\",\n \"telephoneNumberId\": \"11223344-5566-7788-9900-aabbccddeeff\",\n \"llmAudioContentGenerationStrategyId\": \"abcdef01-2345-6789-abcd-ef0123456789\",\n \"extensions\": [\n {\n \"type\": \"crm_lookup_v1\",\n \"parameters\": {\n \"crm_system_url\": \"https://mycrm.example.com/api\",\n \"api_key_secret\": \"secret_crm_key\"\n }\n }\n ],\n \"callEventHooks\": [\n {\n \"type\": \"webhook_call_ended_v1\",\n \"parameters\": {\n \"target_url\": \"https://my.service.com/call_event\",\n \"auth_token\": \"bearer_abc123\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sales Bot Alpha\",\n \"userValueTypes\": {\n \"customer_name\": \"STRING\",\n \"product_interest\": \"STRING\",\n \"order_id\": \"NUMBER\"\n },\n \"systemPromptTemplate\": \"You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.\",\n \"telephoneNumberId\": \"11223344-5566-7788-9900-aabbccddeeff\",\n \"llmAudioContentGenerationStrategyId\": \"abcdef01-2345-6789-abcd-ef0123456789\",\n \"extensions\": [\n {\n \"type\": \"crm_lookup_v1\",\n \"parameters\": {\n \"crm_system_url\": \"https://mycrm.example.com/api\",\n \"api_key_secret\": \"secret_crm_key\"\n }\n }\n ],\n \"callEventHooks\": [\n {\n \"type\": \"webhook_call_ended_v1\",\n \"parameters\": {\n \"target_url\": \"https://my.service.com/call_event\",\n \"auth_token\": \"bearer_abc123\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": "2025-04-17T14:23:30Z",
"message": "<string>",
"data": {
"id": "98765432-10fe-dcba-9876-543210fedcba",
"name": "Sales Bot Alpha",
"systemPromptTemplate": "You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.",
"userValueTypes": {
"customer_name": "STRING",
"product_interest": "STRING",
"order_id": "NUMBER"
},
"llmAudioContentGenerationStrategyId": "abcdef01-2345-6789-abcd-ef0123456789",
"telephoneNumberId": "11223344-5566-7788-9900-aabbccddeeff",
"extensions": [
{
"id": "deadbeef-cafe-babe-feed-faceabadb001",
"name": "CRM Lookup",
"type": "crm_lookup_v1",
"parameters": {
"crm_system_url": "https://mycrm.example.com/api",
"api_key_secret": "secret_crm_key"
}
}
],
"callEventHooks": [
{
"id": "b00bface-1337-badd-cafe-d00df00dcafe",
"type": "webhook_call_ended_v1",
"parameters": {
"target_url": "https://my.service.com/call_event",
"auth_token": "bearer_abc123"
}
}
]
},
"traceId": "<string>"
}Path Parameters
ID of the Vendor (UUID)
ID of the Organization (UUID)
Body
Agent creation data
Data required to create a new Agent
Name of the agent.
"Sales Bot Alpha"
Map defining user-specific value types the agent can handle.
Show child attributes
Show child attributes
{
"customer_name": "STRING",
"product_interest": "STRING",
"order_id": "NUMBER"
}
Template for the system prompt used by the agent's underlying LLM.
"You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads."
ID of the telephone number assigned to this agent (UUID).
"11223344-5566-7788-9900-aabbccddeeff"
ID of the LLM Audio Content Generation Strategy used by the agent (UUID).
"abcdef01-2345-6789-abcd-ef0123456789"
List of LLM extensions configured for this agent.
Show child attributes
Show child attributes
List of Call Event Hooks configured for this agent.
Show child attributes
Show child attributes
Response
Agent successfully created
Standard API response wrapper
Indicates if the request was successful
true
Response timestamp in ISO-8601 format
"2025-04-17T14:23:30Z"
Human-readable message
Payload data object
Show child attributes
Show child attributes
Correlation or trace ID
Was this page helpful?
curl --request POST \
--url https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sales Bot Alpha",
"userValueTypes": {
"customer_name": "STRING",
"product_interest": "STRING",
"order_id": "NUMBER"
},
"systemPromptTemplate": "You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.",
"telephoneNumberId": "11223344-5566-7788-9900-aabbccddeeff",
"llmAudioContentGenerationStrategyId": "abcdef01-2345-6789-abcd-ef0123456789",
"extensions": [
{
"type": "crm_lookup_v1",
"parameters": {
"crm_system_url": "https://mycrm.example.com/api",
"api_key_secret": "secret_crm_key"
}
}
],
"callEventHooks": [
{
"type": "webhook_call_ended_v1",
"parameters": {
"target_url": "https://my.service.com/call_event",
"auth_token": "bearer_abc123"
}
}
]
}
'import requests
url = "https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents"
payload = {
"name": "Sales Bot Alpha",
"userValueTypes": {
"customer_name": "STRING",
"product_interest": "STRING",
"order_id": "NUMBER"
},
"systemPromptTemplate": "You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.",
"telephoneNumberId": "11223344-5566-7788-9900-aabbccddeeff",
"llmAudioContentGenerationStrategyId": "abcdef01-2345-6789-abcd-ef0123456789",
"extensions": [
{
"type": "crm_lookup_v1",
"parameters": {
"crm_system_url": "https://mycrm.example.com/api",
"api_key_secret": "secret_crm_key"
}
}
],
"callEventHooks": [
{
"type": "webhook_call_ended_v1",
"parameters": {
"target_url": "https://my.service.com/call_event",
"auth_token": "bearer_abc123"
}
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sales Bot Alpha',
userValueTypes: {customer_name: 'STRING', product_interest: 'STRING', order_id: 'NUMBER'},
systemPromptTemplate: 'You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.',
telephoneNumberId: '11223344-5566-7788-9900-aabbccddeeff',
llmAudioContentGenerationStrategyId: 'abcdef01-2345-6789-abcd-ef0123456789',
extensions: [
{
type: 'crm_lookup_v1',
parameters: {
crm_system_url: 'https://mycrm.example.com/api',
api_key_secret: 'secret_crm_key'
}
}
],
callEventHooks: [
{
type: 'webhook_call_ended_v1',
parameters: {target_url: 'https://my.service.com/call_event', auth_token: 'bearer_abc123'}
}
]
})
};
fetch('https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/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://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents",
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' => 'Sales Bot Alpha',
'userValueTypes' => [
'customer_name' => 'STRING',
'product_interest' => 'STRING',
'order_id' => 'NUMBER'
],
'systemPromptTemplate' => 'You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.',
'telephoneNumberId' => '11223344-5566-7788-9900-aabbccddeeff',
'llmAudioContentGenerationStrategyId' => 'abcdef01-2345-6789-abcd-ef0123456789',
'extensions' => [
[
'type' => 'crm_lookup_v1',
'parameters' => [
'crm_system_url' => 'https://mycrm.example.com/api',
'api_key_secret' => 'secret_crm_key'
]
]
],
'callEventHooks' => [
[
'type' => 'webhook_call_ended_v1',
'parameters' => [
'target_url' => 'https://my.service.com/call_event',
'auth_token' => 'bearer_abc123'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents"
payload := strings.NewReader("{\n \"name\": \"Sales Bot Alpha\",\n \"userValueTypes\": {\n \"customer_name\": \"STRING\",\n \"product_interest\": \"STRING\",\n \"order_id\": \"NUMBER\"\n },\n \"systemPromptTemplate\": \"You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.\",\n \"telephoneNumberId\": \"11223344-5566-7788-9900-aabbccddeeff\",\n \"llmAudioContentGenerationStrategyId\": \"abcdef01-2345-6789-abcd-ef0123456789\",\n \"extensions\": [\n {\n \"type\": \"crm_lookup_v1\",\n \"parameters\": {\n \"crm_system_url\": \"https://mycrm.example.com/api\",\n \"api_key_secret\": \"secret_crm_key\"\n }\n }\n ],\n \"callEventHooks\": [\n {\n \"type\": \"webhook_call_ended_v1\",\n \"parameters\": {\n \"target_url\": \"https://my.service.com/call_event\",\n \"auth_token\": \"bearer_abc123\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sales Bot Alpha\",\n \"userValueTypes\": {\n \"customer_name\": \"STRING\",\n \"product_interest\": \"STRING\",\n \"order_id\": \"NUMBER\"\n },\n \"systemPromptTemplate\": \"You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.\",\n \"telephoneNumberId\": \"11223344-5566-7788-9900-aabbccddeeff\",\n \"llmAudioContentGenerationStrategyId\": \"abcdef01-2345-6789-abcd-ef0123456789\",\n \"extensions\": [\n {\n \"type\": \"crm_lookup_v1\",\n \"parameters\": {\n \"crm_system_url\": \"https://mycrm.example.com/api\",\n \"api_key_secret\": \"secret_crm_key\"\n }\n }\n ],\n \"callEventHooks\": [\n {\n \"type\": \"webhook_call_ended_v1\",\n \"parameters\": {\n \"target_url\": \"https://my.service.com/call_event\",\n \"auth_token\": \"bearer_abc123\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.deepslate.eu/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sales Bot Alpha\",\n \"userValueTypes\": {\n \"customer_name\": \"STRING\",\n \"product_interest\": \"STRING\",\n \"order_id\": \"NUMBER\"\n },\n \"systemPromptTemplate\": \"You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.\",\n \"telephoneNumberId\": \"11223344-5566-7788-9900-aabbccddeeff\",\n \"llmAudioContentGenerationStrategyId\": \"abcdef01-2345-6789-abcd-ef0123456789\",\n \"extensions\": [\n {\n \"type\": \"crm_lookup_v1\",\n \"parameters\": {\n \"crm_system_url\": \"https://mycrm.example.com/api\",\n \"api_key_secret\": \"secret_crm_key\"\n }\n }\n ],\n \"callEventHooks\": [\n {\n \"type\": \"webhook_call_ended_v1\",\n \"parameters\": {\n \"target_url\": \"https://my.service.com/call_event\",\n \"auth_token\": \"bearer_abc123\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": "2025-04-17T14:23:30Z",
"message": "<string>",
"data": {
"id": "98765432-10fe-dcba-9876-543210fedcba",
"name": "Sales Bot Alpha",
"systemPromptTemplate": "You are a helpful sales assistant for ACME Corp. Your goal is to qualify leads.",
"userValueTypes": {
"customer_name": "STRING",
"product_interest": "STRING",
"order_id": "NUMBER"
},
"llmAudioContentGenerationStrategyId": "abcdef01-2345-6789-abcd-ef0123456789",
"telephoneNumberId": "11223344-5566-7788-9900-aabbccddeeff",
"extensions": [
{
"id": "deadbeef-cafe-babe-feed-faceabadb001",
"name": "CRM Lookup",
"type": "crm_lookup_v1",
"parameters": {
"crm_system_url": "https://mycrm.example.com/api",
"api_key_secret": "secret_crm_key"
}
}
],
"callEventHooks": [
{
"id": "b00bface-1337-badd-cafe-d00df00dcafe",
"type": "webhook_call_ended_v1",
"parameters": {
"target_url": "https://my.service.com/call_event",
"auth_token": "bearer_abc123"
}
}
]
},
"traceId": "<string>"
}