Calls
Outbound and inbound telephony calls placed by a phone agent.
List calls
/callscurl -X GET "https://api.rabbitt.ai/api/v1/calls" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://api.rabbitt.ai/api/v1/calls", {
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/calls",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
)
response.raise_for_status()
data = response.json()Query parameters
agentIdstringoptionalstatusstringoptionalOne of:createdactivecompleted
pageintegeroptionaldefault: 1 · min 1
limitintegeroptionaldefault: 25 · 1–100
Responses
Response body - 200
objectstringdataTypestringdataobject[]paginationobjectPlace an outbound call
/callsCreates a call for a phone agent and begins dialing immediately. Returns as soon as the carrier accepts the request — poll the call or wait for the report to observe the outcome.
curl -X POST "https://api.rabbitt.ai/api/v1/calls" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"agentId": "507f1f77bcf86cd799439011",
"phoneNumber": "+919876543210"
}'const response = await fetch("https://api.rabbitt.ai/api/v1/calls", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RABBITT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"agentId": "507f1f77bcf86cd799439011",
"phoneNumber": "+919876543210"
}),
});
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/calls",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
json={
"agentId": "507f1f77bcf86cd799439011",
"phoneNumber": "+919876543210"
},
)
response.raise_for_status()
data = response.json()Body parameters
agentIdstringrequiredphoneNumberstringrequiredDestination in E.164 format, e.g. +919876543210.
max length 30
contactNamestringoptionalmax length 200
externalRefstringoptionalYour own identifier for this call, echoed back on the call and its report.
max length 500
variablesobjectoptionalValues for the {{placeholders}} declared in the agent's instructions.
Responses
Response body - 201
idstringobjectstringagentIdstringagentNamestringstatusstring`created` before the call connects, `active` while in progress, `completed` once it ends. When `reportId` is present the analysis has finished.
One of:createdactivecompleted
directionstringphoneNumberstringcontactNamestringattemptNumberintegercampaignIdstringdispositionstringlanguagestringexternalRefstringstartedAttimestampendedAttimestampdurationSecondsintegerchargedMinutesnumberreportIdstringrecordingAvailablebooleancreatedAttimestampRetrieve a call
/calls/{id}curl -X GET "https://api.rabbitt.ai/api/v1/calls/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://api.rabbitt.ai/api/v1/calls/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/calls/507f1f77bcf86cd799439011",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
)
response.raise_for_status()
data = response.json()Path parameters
idstringrequiredResponses
Response body - 200
idstringobjectstringagentIdstringagentNamestringstatusstring`created` before the call connects, `active` while in progress, `completed` once it ends. When `reportId` is present the analysis has finished.
One of:createdactivecompleted
directionstringphoneNumberstringcontactNamestringattemptNumberintegercampaignIdstringdispositionstringlanguagestringexternalRefstringstartedAttimestampendedAttimestampdurationSecondsintegerchargedMinutesnumberreportIdstringrecordingAvailablebooleancreatedAttimestampRetrieve a call transcript
/calls/{id}/transcriptTurns in chronological order. Empty while the call is still connecting.
curl -X GET "https://api.rabbitt.ai/api/v1/calls/507f1f77bcf86cd799439011/transcript" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://api.rabbitt.ai/api/v1/calls/507f1f77bcf86cd799439011/transcript", {
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/calls/507f1f77bcf86cd799439011/transcript",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
)
response.raise_for_status()
data = response.json()Path parameters
idstringrequiredResponses
Response body - 200
objectstringcallIdstringdataobject[]Retrieve a call report
/calls/{id}/reportReports are generated asynchronously after a call ends. Responds 202 with `status: "pending"` until the analysis is ready.
curl -X GET "https://api.rabbitt.ai/api/v1/calls/507f1f77bcf86cd799439011/report" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://api.rabbitt.ai/api/v1/calls/507f1f77bcf86cd799439011/report", {
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/calls/507f1f77bcf86cd799439011/report",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
)
response.raise_for_status()
data = response.json()Path parameters
idstringrequiredResponses
Response body - 202
objectstringcallIdstringstatusstringEnd a call in progress
/calls/{id}/hangupcurl -X POST "https://api.rabbitt.ai/api/v1/calls/507f1f77bcf86cd799439011/hangup" \
-H "Authorization: Bearer rb_live_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://api.rabbitt.ai/api/v1/calls/507f1f77bcf86cd799439011/hangup", {
method: "POST",
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.post(
"https://api.rabbitt.ai/api/v1/calls/507f1f77bcf86cd799439011/hangup",
headers={"Authorization": f"Bearer {os.environ['RABBITT_API_KEY']}"},
)
response.raise_for_status()
data = response.json()Path parameters
idstringrequiredResponses
Response body - 200
idstringobjectstringagentIdstringagentNamestringstatusstring`created` before the call connects, `active` while in progress, `completed` once it ends. When `reportId` is present the analysis has finished.
One of:createdactivecompleted
directionstringphoneNumberstringcontactNamestringattemptNumberintegercampaignIdstringdispositionstringlanguagestringexternalRefstringstartedAttimestampendedAttimestampdurationSecondsintegerchargedMinutesnumberreportIdstringrecordingAvailablebooleancreatedAttimestamp