Skip to main content
The NeuronLens Analytics API gives you programmatic access to the same aggregated metrics, trend data, and compliance insights visible in the dashboard — so you can power your own BI tools, build internal dashboards, or trigger automated alerts based on QA thresholds. All analytics endpoints accept date ranges and optional grouping dimensions, and return pre-aggregated results you can render directly.

Get Call Analytics

GET /analytics/calls Returns aggregated call metrics across a date range. Use group_by to break results down by day, week, agent, campaign, or language.

Query Parameters

string
required
ISO 8601 date string — start of the date range (inclusive). Example: 2024-01-01.
string
required
ISO 8601 date string — end of the date range (inclusive). Example: 2024-01-31.
string
Limit results to calls from a specific campaign.
string
Limit results to calls handled by a specific agent (for human-agent escalations and manually dialed calls).
string
Limit results to calls conducted in a specific BCP-47 language code. Example: hi-IN.
string
Dimension to group results by. When provided, the response includes a grouped_data array with one entry per group. Accepted values: day, week, agent, campaign, language.

Example Request

Example Response

When group_by=day or group_by=week, each entry in grouped_data includes the period start date as the group value. When group_by=agent, campaign, or language, the group value is the respective ID or code. Days with zero calls are included as entries with all metric values set to 0.

Get QA Scores

GET /analytics/qa Fetch QA evaluation scores for a single call or aggregated across a date range and set of filters.

Query Parameters

string
Return QA scores for a specific call. When provided, all other filters are ignored.
string
ISO 8601 date — start of range for aggregated QA scores. Required when call_id is not provided.
string
ISO 8601 date — end of range for aggregated QA scores. Required when call_id is not provided.
string
Limit aggregated scores to a specific agent.
string
Limit results to evaluations performed against a specific QA scorecard.

Example Request

Example Response

Sort parameter_scores by pass_rate ascending in your reporting layer to surface the parameters where agents most frequently fall short — these are your highest-leverage coaching opportunities.

Get Compliance Results

GET /analytics/compliance Returns compliance monitoring results — whether specific regulatory and script adherence checks passed or failed for a given call or across a date range.

Query Parameters

string
Return compliance results for a single specific call.
string
ISO 8601 date — start of date range for aggregated compliance results.
string
ISO 8601 date — end of date range for aggregated compliance results.
string
Filter compliance results to a specific campaign.
string
Filter by BCP-47 language code.

Example Request

Example Response

Compliance violations with severity: critical indicate regulatory requirements that were not met (e.g., DND opt-out not offered). These require immediate review. warning severity indicates best-practice deviations that should be monitored but are not regulatory breaches.

Search Transcripts

GET /analytics/search Full-text search across all processed call transcripts in your workspace. Returns matching transcript segments with their call context — useful for auditing, finding specific topics, or identifying calls where particular phrases were used.

Query Parameters

string
required
The keyword or phrase to search for. The search is case-insensitive and matches partial words. For multi-word phrases, the words must appear in proximity (within 5 seconds of each other in the transcript timeline).
string
ISO 8601 date — limit search to calls that occurred on or after this date.
string
ISO 8601 date — limit search to calls that occurred on or before this date.
string
Limit search to transcripts in a specific BCP-47 language.
integer
default:"20"
Number of matching segments to return per page. Maximum 100.
integer
default:"0"
Number of results to skip for pagination.

Example Request

Example Response

Search results highlight the matched terms in the text field with markdown bold markers (**term**) for easy rendering in your UI. Strip the markers if you need plain text.