Skip to main content
GET
https://allomia.com
/
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>",
      "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

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 (1-based indexing)
limit
integer
default:"10"
Number of items per page (default 10, max 20)
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
from
string
Start date for date range filter (ISO 8601 format: “2025-05-01T00:00:00Z”). Must be a valid ISO 8601 datetime string. 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”). Must be a valid ISO 8601 datetime string. If both from and to are provided, to must be after or equal to from.
userPrimaryIntent
string
Filter calls by user primary intent
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&agentName=Dr.%20Smith%20Assistant&from=2025-05-01T00:00:00Z&to=2025-06-01T00:00:00Z&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",
      "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",
      "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 now 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 logic (from > 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": "Internal server error occurred"
}