List Calls
curl --request GET \
--url https://allomia.com/api/calls \
--header 'Authorization: <authorization>'import requests
url = "https://allomia.com/api/calls"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://allomia.com/api/calls', 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://allomia.com/api/calls",
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: <authorization>"
],
]);
$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://allomia.com/api/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://allomia.com/api/calls")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://allomia.com/api/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"calls": [
{
"id": "<string>",
"organizationId": "<string>",
"callType": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"teamId": "<string>",
"teamName": "<string>",
"phoneNumber": "<string>",
"callStartedAt": "<string>",
"callEndedAt": "<string>",
"callDurationSeconds": "<string>",
"userPhoneNumber": "<string>",
"createdAt": "<string>"
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123,
"hasNextPage": true,
"hasPreviousPage": true
}
}Calls
List Calls
Retrieves a paginated list of call logs for a specific organization
GET
/
api
/
calls
List Calls
curl --request GET \
--url https://allomia.com/api/calls \
--header 'Authorization: <authorization>'import requests
url = "https://allomia.com/api/calls"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://allomia.com/api/calls', 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://allomia.com/api/calls",
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: <authorization>"
],
]);
$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://allomia.com/api/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://allomia.com/api/calls")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://allomia.com/api/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"calls": [
{
"id": "<string>",
"organizationId": "<string>",
"callType": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"teamId": "<string>",
"teamName": "<string>",
"phoneNumber": "<string>",
"callStartedAt": "<string>",
"callEndedAt": "<string>",
"callDurationSeconds": "<string>",
"userPhoneNumber": "<string>",
"createdAt": "<string>"
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123,
"hasNextPage": true,
"hasPreviousPage": true
}
}List Calls
Retrieves a paginated list of call logs for a specific organization. This endpoint can be accessed using either a tenant API key or an organization API key. The organization ID must be specified as a query parameter regardless of which authentication method is used.This endpoint returns basic call information. For detailed call information
including transcript and recording URLs, use the Get
Call endpoint.
Headers
string
required
API key is required. Enter either your tenant-specific or
organization-specific API key in the format
Bearer YOUR-API-KEYQuery Parameters
string
required
The ID of the organization to list calls for
integer
default:"1"
Page number for pagination (minimum: 1)
integer
default:"20"
Number of items per page (minimum: 1, maximum: 50)
string
Filter calls by type. Must be one of:
Inbound, Outbound, Web. Invalid values will return a 400 error.string
Filter calls by agent name (partial match supported).
string
Start date for date range filter (ISO 8601 format:
2025-05-01T00:00:00Z). If both from and to are provided, from must be before or equal to to.string
End date for date range filter (ISO 8601 format:
2025-06-01T00:00:00Z). If both from and to are provided, to must be after or equal to from.string
Filter calls by the user’s primary intent detected during the call.
string
default:"desc"
Sort order for results. Possible values:
asc, desc, duration_desc, duration_asc.Response
array
Show properties
Show properties
string
Unique identifier for the call
string
Organization ID the call belongs to
string
Type of call:
Inbound, Outbound, or Webstring
ID of the agent/assistant that handled the call
string
Name of the agent/assistant
string
ID of the team that owns the assistant.
null for organizations that don’t use teams.string
Name of the team that owns the assistant.
null for organizations that don’t use teams.string
Phone number associated with the call
string
Timestamp when the call started (ISO 8601 format:
2025-05-28T14:20:15Z)string
Timestamp when the call ended (ISO 8601 format:
2025-05-28T14:23:15Z)string
Duration of the call in seconds
string
Phone number of the user (if available)
string
When the call record was created (ISO 8601 format:
2025-05-28T14:23:45Z)object
Example Request
curl -X GET "https://allomia.com/api/calls?organizationId=a1b2c3d4-e5f6-7890-abcd-123456789012&page=1&limit=10&callType=Inbound&from=2025-05-01T00%3A00%3A00Z&to=2025-06-01T00%3A00%3A00Z&sort=desc" \
-H "Authorization: Bearer YOUR-API-KEY"
Example Response
{
"calls": [
{
"id": "f6a7b8c9-d0e1-2345-fabc-678901234567",
"organizationId": "a1b2c3d4-e5f6-7890-abcd-123456789012",
"callType": "Inbound",
"agentId": "g7b8c9d0-e1f2-3456-abcd-789012345678",
"agentName": "Dr. Smith Assistant",
"teamId": "t1e2a3m4-5678-9012-abcd-ef1234567890",
"teamName": "Front Desk",
"phoneNumber": "+15559876543",
"callStartedAt": "2025-05-28T14:20:15Z",
"callEndedAt": "2025-05-28T14:23:15Z",
"callDurationSeconds": "180",
"userPhoneNumber": "+15551234567",
"createdAt": "2025-05-28T14:23:45Z"
},
{
"id": "h8c9d0e1-f2a3-4567-bcde-890123456789",
"organizationId": "a1b2c3d4-e5f6-7890-abcd-123456789012",
"callType": "Inbound",
"agentId": "g7b8c9d0-e1f2-3456-abcd-789012345678",
"agentName": "Dr. Smith Assistant",
"teamId": null,
"teamName": null,
"phoneNumber": "+15559876543",
"callStartedAt": "2025-05-27T09:10:34Z",
"callEndedAt": "2025-05-27T09:12:34Z",
"callDurationSeconds": "120",
"userPhoneNumber": "+15552345678",
"createdAt": "2025-05-27T09:12:34Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 42,
"totalPages": 5,
"hasNextPage": true,
"hasPreviousPage": false
}
}
Error Responses
400: Invalid request data
400: Invalid request data
The API performs comprehensive validation and returns detailed error information.Invalid callType:Invalid date format:Invalid date range (
{
"error": "Invalid request data",
"details": [
{
"field": "callType",
"message": "Invalid enum value. Expected 'Inbound' | 'Outbound' | 'Web', received 'fax'",
"code": "invalid_enum_value"
}
]
}
{
"error": "Invalid request data",
"details": [
{
"field": "from",
"message": "Invalid date format. Expected ISO 8601 format (e.g., 2025-05-01T00:00:00Z)",
"code": "custom"
}
]
}
from after to):{
"error": "Invalid request data",
"details": [
{
"field": "from",
"message": "The 'from' date must be before or equal to the 'to' date",
"code": "custom"
}
]
}
401: Unauthorized
401: Unauthorized
{
"error": "Invalid or missing API key"
}
404: Organization not found
404: Organization not found
{
"error": "Organization not found"
}
500: Error
500: Error
{
"error": "Internal server error occurred"
}