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
}
}
}
}Lists or filters calls (current behavior).
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
}
}
}
}API Key for MCP server and external service authentication
API Secret for MCP server and external service authentication
Optional filters and pagination parameters
Page number (0-based indexing)
0
Items per page (1-100)
20
Field to sort by (e.g., start_timestamp, end_timestamp, call_duration, call_id)
"start_timestamp"
Sort direction (ascending or descending)
"descending"
Filtering criteria for calls