Agents
Voice and phone agents — the reusable definition of who the AI is and what it should accomplish.
List agents
/agentsReturns the agents belonging to your organization, newest first.
curl -X GET "https://api.rabbitt.ai/api/v1/agents" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://api.rabbitt.ai/api/v1/agents", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.RABBITT_API_KEY}`,
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.code}: ${error.message}`);
}
const data = await response.json();import os
import requests
response = requests.get(
"https://api.rabbitt.ai/api/v1/agents",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
)
response.raise_for_status()
data = response.json()Query parameters
typestringoptional`phone` agents place and receive calls; `voice` agents run browser-based interviews.
One of:voicephone
default: "phone"
pageintegeroptionaldefault: 1 · min 1
limitintegeroptionaldefault: 25 · 1–100
Responses
Response body - 200
objectstringdataTypestringdataobject[]paginationobjectpageintegerlimitintegertotalintegertotalPagesintegerhasMorebooleanCreate an agent
/agentsCreates a voice or phone agent. Counts against your organization's agent quota.
curl -X POST "https://api.rabbitt.ai/api/v1/agents" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Asha Menon",
"instructions": "You are a friendly scheduling assistant. Confirm the appointment time."
}'const response = await fetch("https://api.rabbitt.ai/api/v1/agents", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RABBITT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Asha Menon",
"instructions": "You are a friendly scheduling assistant. Confirm the appointment time."
}),
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.code}: ${error.message}`);
}
const data = await response.json();import os
import requests
response = requests.post(
"https://api.rabbitt.ai/api/v1/agents",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
json={
"name": "Asha Menon",
"instructions": "You are a friendly scheduling assistant. Confirm the appointment time."
},
)
response.raise_for_status()
data = response.json()Body parameters
typestringoptionalOne of:voicephone
default: "phone"
namestringrequiredmax length 200
descriptionstringoptionalmax length 2000
instructionsstringrequiredThe agent's system prompt: who it is, what it must accomplish, and how it should behave.
max length 20000
modestringoptionalVoice agents only. Selects the prompt and report family.
One of:interviewworkflow
languagestringoptionalsectorstringoptionalmaxDurationMinutesintegeroptional1–120
providersobjectoptionalllmstringoptionalOne of:mistralgeminigroq
sttstringoptionalttsstringoptionalphoneobjectoptionaldirectionstringoptionalOne of:outboundinboundboth
greetingstringoptionalmax length 2000
fallbackstringoptionalmax length 2000
voicemailBehaviorstringoptionalOne of:hangupleave_messagemark_no_answer
maxAttemptsintegeroptional1–5
retryDelayMinutesintegeroptionalmin 1
requiredContactFieldsstring[]optionaloutcomeLabelsstring[]optionalvoiceobjectoptionalgoalstringoptionalmax length 2000
openingstringoptionalmax length 2000
evaluationStylestringoptionalmax length 2000
evaluationCriteriastring[]optionaldifficultystringoptionalResponses
Response body - 201
idstringobjectstringtypestringOne of:voicephone
namestringdescriptionstringmodestringlanguagestringsectorstringmaxDurationMinutesintegerinstructionsstringprovidersobjectllmstringsttstringttsstringsessionsCountintegercreatedAttimestampRetrieve an agent
/agents/{id}curl -X GET "https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.RABBITT_API_KEY}`,
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.code}: ${error.message}`);
}
const data = await response.json();import os
import requests
response = requests.get(
"https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
)
response.raise_for_status()
data = response.json()Path parameters
idstringrequiredResponses
Response body - 200
idstringobjectstringtypestringOne of:voicephone
namestringdescriptionstringmodestringlanguagestringsectorstringmaxDurationMinutesintegerinstructionsstringprovidersobjectllmstringsttstringttsstringsessionsCountintegercreatedAttimestampUpdate an agent
/agents/{id}Only the supplied fields are changed.
curl -X PATCH "https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Asha Menon",
"description": "…",
"instructions": "You are a friendly scheduling assistant. Confirm the appointment time.",
"language": "…",
"sector": "…",
"maxDurationMinutes": 1,
"providers": {},
"phone": {},
"voice": {}
}'const response = await fetch("https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.RABBITT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Asha Menon",
"description": "…",
"instructions": "You are a friendly scheduling assistant. Confirm the appointment time.",
"language": "…",
"sector": "…",
"maxDurationMinutes": 1,
"providers": {},
"phone": {},
"voice": {}
}),
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.code}: ${error.message}`);
}
const data = await response.json();import os
import requests
response = requests.patch(
"https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
json={
"name": "Asha Menon",
"description": "…",
"instructions": "You are a friendly scheduling assistant. Confirm the appointment time.",
"language": "…",
"sector": "…",
"maxDurationMinutes": 1,
"providers": {},
"phone": {},
"voice": {}
},
)
response.raise_for_status()
data = response.json()Path parameters
idstringrequiredBody parameters
namestringoptionalmax length 200
descriptionstringoptionalmax length 2000
instructionsstringoptionalmax length 20000
languagestringoptionalsectorstringoptionalmaxDurationMinutesintegeroptional1–120
providersobjectoptionalphoneobjectoptionalvoiceobjectoptionalResponses
Response body - 200
idstringobjectstringtypestringOne of:voicephone
namestringdescriptionstringmodestringlanguagestringsectorstringmaxDurationMinutesintegerinstructionsstringprovidersobjectllmstringsttstringttsstringsessionsCountintegercreatedAttimestampDelete an agent
/agents/{id}curl -X DELETE "https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.RABBITT_API_KEY}`,
},
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.code}: ${error.message}`);
}
const data = await response.json();import os
import requests
response = requests.delete(
"https://api.rabbitt.ai/api/v1/agents/507f1f77bcf86cd799439011",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
)
response.raise_for_status()
data = response.json()Path parameters
idstringrequiredResponses
Response body - 200
idstringobjectstringdeletedboolean