Queries calls based on filters
/calls/queryGETAPI KEY or JWT Token)src/types/calls_services/query.rs| Parameter | Type | Description | Example |
|---|---|---|---|
campaign_id | UUID (optional) | Filter by specific campaign | 550e8400-e29b-41d4-a716-446655440000 |
ai_agent_id | UUID (optional) | Filter by specific AI agent | 550e8400-e29b-41d4-a716-446655440001 |
status | String (optional) | Filter by call status (case-insensitive partial match) | completed, failed, in-progress |
search | String (optional) | Search across multiple fields (call_to, notes, feedback, transcript) | John Doe or +1234567890 |
| Parameter | Type | Description | Example |
|---|---|---|---|
start_date | Date (optional) | Filter calls started on or after this date | 2024-01-01 |
end_date | Date (optional) | Filter calls started on or before this date | 2024-12-31 |
| Parameter | Type | Description | Default | Example |
|---|---|---|---|---|
page | Integer | Page number (0-indexed) | 0 | 2 |
per_page | Integer | Number of results per page | 10 | 25 |
| Parameter | Type | Description | Default | Example |
|---|---|---|---|---|
sort_column | String | Column to sort by | created_at | See supported columns below |
order | String | Sort order | desc | asc or desc |
name (sorts by call_to)created_atupdated_atstarted_atended_atcall_durationcall_sidcall_fromcall_tocall_providercall_statuscall_directioncall_ratingcall_feedbackrecord_urltranscripttranscript_languageis_testcostprice_unitlatencydisconnect_reasonanalysis_sentimentagent_task_statusagent_task_feedbackmetadatanotesagent_dynamic_variablesagent_post_call_outcomesretry_at| Parameter | Type | Description |
|---|---|---|
filter_columns[] | Array<String> | Column names to filter on |
filter_values[] | Array<String> | Values to filter for (parallel to columns) |
filter_operator[] | Array<String> | Operators to use (parallel to columns) |
call_direction, call_status, call_to, call_from, transcript, notes, call_feedback, call_sid, call_provider, disconnect_reason, analysis_sentiment, agent_task_status, agent_task_feedback, price_unit
Supported Operators:
EQUALS - Exact matchNOT_EQUALS - Not equal to valueCONTAINS - Contains substring (case-insensitive)NOT_CONTAINS - Does not contain substringNOT_NULL - Field has a valueIS_NULL - Field is null/emptyINCLUDES - Same as EQUALS (for compatibility)NOT_INCLUDES - Same as NOT_EQUALScall_duration (integer), call_rating (integer), cost (float), latency (integer)
Supported Operators:
EQUALS - Exact matchNOT_EQUALS - Not equal to valueGREATER_THAN - Greater than valueGREATER_OR_EQUAL - Greater than or equal to valueLOWER_THAN - Less than valueLOWER_OR_EQUAL - Less than or equal to valueNOT_NULL - Field has a valueIS_NULL - Field is nullis_test
Supported Operators:
EQUALS - Match boolean value (true/false)NOT_EQUALS - Not equal to boolean valueNOT_NULL - Field has a valueIS_NULL - Field is nullid
Supported Operators:
EQUALS - Exact UUID matchNOT_EQUALS - Not equal to UUIDNOT_NULL - Field has a valueIS_NULL - Field is nullin-progress for more than 360 minutes are marked as endedpstn-queued for more than 5 minutes are marked as unreachable200 OK
search parameter searches across: call_to, notes, call_feedback, agent_task_feedback, and transcriptscheduled or pstn-queued are automatically excluded from resultsstarted_at fieldper_page value should be reasonable (e.g., 100-500) to avoid performance issuesBearer authentication header of the form Bearer <token>, where <token> is your auth token.
Filter by AI agent ID
Search term for calls
Filter by call status
Filter by start date (YYYY-MM-DD)
Filter by end date (YYYY-MM-DD)
Filter by campaign ID
Column to sort by
Sort order (asc/desc)
Page number for pagination
Number of items per page
Comma-separated list of columns to filter on
Comma-separated list of values for the filter_columns
Operator for filtering (e.g., eq, neq, gt, lt)
Optional workspace filter. If not provided, it will fall back to use "default".