Searches historical call results with advanced filtering, full-text search, nested JSON queries, and aggregations. Supports complex queries including date ranges, status filters, agent filtering, and custom field searches within call additional data.
Search criteria and options
Search parameters for querying completed call results with flexible filtering, pagination, and aggregation options. Enables searching call history by various criteria including agent, status, date range, and custom data fields for analytics and reporting.
Page number for pagination, using 0-based indexing where 0 is the first page. Defaults to 0 to return the first page of results.
Number of call results to return per page. Defaults to 20, allowing you to balance between fewer requests and manageable response sizes.
1 <= x <= 100Filter results to calls handled by specific agents. When specified, only returns calls from the listed agents. Useful for analyzing individual agent performance or filtering to specific use cases.
Filter results by call completion status. When specified, only returns calls with matching statuses (Completed, Failed, Canceled, etc.). Useful for analyzing success rates or investigating failed calls.
Current status of a call in its lifecycle. Tracks the call's progress from creation through completion or failure.
Unknown, Created, Pending, Queued, Completed, Failed, Canceled, Running Start of date range for filtering call results by completion time. Only returns calls completed on or after this timestamp. Combine with ToDate for specific time period analysis.
End of date range for filtering call results by completion time. Only returns calls completed on or before this timestamp. Combine with FromDate for specific time period analysis.
Free-text search query that searches across multiple call fields including transcriptions, additional data, endpoints, and other text content. Uses full-text search capabilities for natural language queries.
Filter results to specific call IDs. When specified, only returns calls with matching identifiers. Useful for retrieving exact calls or investigating specific customer interactions.
Filter results by the called endpoint (phone number or SIP address). Only returns calls to the specified destination. Useful for analyzing calls to specific numbers or SIP endpoints.
Filter results by values in the call's additional data fields. Allows querying custom business data passed to calls, enabling searches like finding all calls with specific customer IDs, order numbers, or campaign tags.
Field name to sort results by. Common values include "completedTime" (when the call ended), "createdTime" (when the call was queued), "durationSeconds" (call length). Defaults to "completedTime" to show most recent calls first when using descending order.
Direction to sort results. Use Descending (default) to show newest or highest values first, or Ascending to show oldest or lowest values first.
Ascending, Descending Whether to include aggregated statistics in the response. When true, the response includes counts by status, agent, endpoint, and time periods. Useful for dashboards and analytics without requiring separate aggregation queries.
Custom fields to aggregate on in addition to standard aggregations. Allows creating custom breakdowns of call data by specific additional data fields or other call properties.
Returns search results successfully
Search results for completed calls including pagination metadata, optional aggregations, and performance metrics. Contains all matching call records plus statistics for navigating large result sets and analyzing call patterns.
Call results in the current page. Each result includes call details, status, duration, transcription, recording links, and custom data. Results are ordered according to the search request's sort parameters.
Total number of calls matching the search criteria across all pages. Use this to calculate pagination metrics (total pages, progress indicators) and understand overall result volume.
Current page number using 0-based indexing. Matches the Page parameter from the search request.
Number of results per page. Matches the Size parameter from the search request.
Total number of pages available based on TotalCount and Size. Useful for building pagination controls and determining if more pages exist.
Search execution time in milliseconds. Indicates query performance and can help identify slow searches that may benefit from more specific filters or indexing optimizations.
Aggregated statistics about the search results including counts by status, agent, endpoint, and time periods. Only present when IncludeAggregations was true in the search request. Useful for dashboards and analytics without additional queries.