Skip to main content
POST
/
api
/
calls
List calls with pagination and filtering
curl --request POST \
  --url http://localhost:8080/api/calls \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-API-SECRET: <api-key>' \
  --data '
{
  "page": 0,
  "limit": 50,
  "sort_by": "start_timestamp",
  "sort_order": "descending",
  "filter_criteria": {
    "call_status": [
      "ongoing",
      "ended",
      "registered"
    ],
    "agent_id": [
      "agent-123",
      "agent-456"
    ],
    "duration_ms": {
      "lower_threshold": 30000,
      "upper_threshold": 300000
    },
    "transcript_search": "help support"
  }
}
'
{
  "message": "Calls retrieved successfully",
  "status": "success",
  "error": null,
  "data": {
    "organization_id": "org-789",
    "calls": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "call_id": "call-456",
        "agent_id": "agent-123",
        "organization_id": "org-789",
        "call_status": "ENDED",
        "call_type": "PHONE_CALL",
        "direction": "OUTBOUND",
        "from_number": "+0987654321",
        "to_number": "+1234567890",
        "start_timestamp": 1703097600000,
        "end_timestamp": 1703098200000,
        "call_duration": 600000
      }
    ],
    "pagination": {
      "page": 0,
      "limit": 50,
      "total_count": 25,
      "total_pages": 1,
      "has_next_page": false,
      "has_previous_page": false
    },
    "returned_count": 1,
    "sort_order": "descending",
    "sort_by": "start_timestamp",
    "applied_filters": {
      "duration_ms": {
        "lower_threshold": 30000,
        "upper_threshold": 300000
      }
    }
  }
}

Authorizations

X-API-KEY
string
header
required

API Key for MCP server and external service authentication

X-API-SECRET
string
header
required

API Secret for MCP server and external service authentication

Body

application/json

Optional filters and pagination parameters

page
integer

Page number (0-based indexing)

Example:

0

limit
integer

Items per page (1-100)

Example:

20

sort_by
string

Field to sort by (e.g., start_timestamp, end_timestamp, call_duration, call_id)

Example:

"start_timestamp"

sort_order
string

Sort direction (ascending or descending)

Example:

"descending"

filter_criteria
object

Filtering criteria for calls

Response

Calls retrieved successfully

message
string
status
string
error
string
data
object