Skip to main content
GET
/
api
/
calls
List Calls
curl --request GET \
  --url https://allomia.com/api/calls \
  --header 'Authorization: <authorization>'
{
  "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
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.allomia.com/llms.txt

Use this file to discover all available pages before exploring further.

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

Authorization
string
required
API key is required. Enter either your tenant-specific or organization-specific API key in the format Bearer YOUR-API-KEY

Query Parameters

organizationId
string
required
The ID of the organization to list calls for
page
integer
default:"1"
Page number for pagination (minimum: 1)
limit
integer
default:"20"
Number of items per page (minimum: 1, maximum: 50)
callType
string
Filter calls by type. Must be one of: Inbound, Outbound, Web. Invalid values will return a 400 error.
agentName
string
Filter calls by agent name (partial match supported).
from
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.
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.
userPrimaryIntent
string
Filter calls by the user’s primary intent detected during the call.
sort
string
default:"desc"
Sort order for results. Possible values: asc, desc, duration_desc, duration_asc.

Response

calls
array
pagination
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

The API performs comprehensive validation and returns detailed error information.Invalid callType:
{
  "error": "Invalid request data",
  "details": [
    {
      "field": "callType",
      "message": "Invalid enum value. Expected 'Inbound' | 'Outbound' | 'Web', received 'fax'",
      "code": "invalid_enum_value"
    }
  ]
}
Invalid date format:
{
  "error": "Invalid request data",
  "details": [
    {
      "field": "from",
      "message": "Invalid date format. Expected ISO 8601 format (e.g., 2025-05-01T00:00:00Z)",
      "code": "custom"
    }
  ]
}
Invalid date range (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"
    }
  ]
}
{
  "error": "Invalid or missing API key"
}
{
  "error": "Organization not found"
}
{
  "error": "Internal server error occurred"
}