Skip to main content
Languages: every operation supports cURL, Node.js (TypeScript), Python, Go, Ruby, and PHP. The first 15 operations on this page show all six languages; the remaining 20 show cURL and TypeScript — the two most-used.

Quality API

Quality endpoints exposed by the Devotel CPaaS API Base path: /api/v1/quality Endpoint count: 35

QA score trend series

GET /api/v1/quality/trends
Time series of official reviewer-authored QA evaluation scores — per-day averages plus per-agent and per-scorecard-form breakdowns. Answers “is quality trending up?” against the scorecard rubrics an org actually grades with; pairs with the point-in-time rollup at GET /quality/summary. Self-evaluations (an agent scoring their own call) and appealed/resolved rows are excluded so only current official scores drive the trend. Read-only; requires an owner, admin, or supervisor role.
string
Look-back window in days over each evaluation’s creation time (1-90). Defaults to 30, capped at 90; an out-of-range or non-numeric value falls back to 30.
string
Restrict the trend to a single scorecard form (rubric) id from /quality/evaluation-forms. Defaults to every form; an over-long value falls back to all forms.
string
Drill the whole trend into one evaluated agent’s scores. Defaults to every agent; an over-long value falls back to all agents.

List auto-qa-readiness

GET /api/v1/quality/auto-qa-readiness
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

AI auto-QA coverage rollup

GET /api/v1/quality/autoscore-coverage
Aggregates the automated quality-scoring pipeline (voice AI auto-scoring against the tenant’s active evaluation form) into one supervisor-facing rollup over the trailing 24 hours. Returns completed_calls_last_24h (the at-most-24h denominator the qa-autoscore scheduler drains), auto_scored_calls (count of call_logs that already carry an auto_scored=TRUE qa_evaluations row — including reviewer-overridden rows, which keep provenance=TRUE), coverage_pct (share of completed calls that received an automated score, 0..100 rounded to one decimal), avg_auto_score (mean total_score across the coverable rows), and pending_review_rows (auto_scored count where flagged_for_review is still TRUE and no reviewer has corrected it yet). Replaces the need to manually join qa_evaluations against call_logs; powers the ‘AI automation coverage’ widget on the Quality dashboard. Read-only; owner / admin / supervisor.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List calibration sessions

GET /api/v1/quality/calibrations
List calibration sessions with optional status / call filters. Each row carries session-level submission counts only — never any individual reviewer’s score. Reviewer scope (owner / admin / supervisor).
string (enum: open|closed)
Filter by session status.
string
Filter by the pinned call.
integer
Maximum sessions to return (1–100, default 50).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get a calibration session

GET /api/v1/quality/calibrations/{id}
Session detail for the blind-scoring view — roster, submission counts, and the caller’s OWN submitted score only. Never returns another reviewer’s or the AI’s scores; those are revealed by the report once the caller submits. Reviewer scope (owner / admin / supervisor).
string
required
Calibration session identifier.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get the calibration agreement report

GET /api/v1/quality/calibrations/{id}/report
The agreement report — per-criterion variance, overall agreement, each reviewer’s delta from the group consensus, and the AI auto-score’s drift. BLIND-GATED: an invited reviewer who has not yet submitted their own score receives 403. The numeric report is meaningful only once at least two human reviewers have submitted. Reviewer scope (owner / admin / supervisor).
string
required
Calibration session identifier.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Per-agent coaching cards

GET /api/v1/quality/coaching-cards
Aggregate each evaluated agent’s official reviewer-authored QA scorecard feedback — their average score, the share of evaluations flagged for human review, the weakest scorecard criteria to drill, open auto-assigned coaching plans, and short badge chips (‘Low QA score’, ‘flagged for review’, ‘open coaching plans’). Reviewer scope (owner / admin / supervisor) may inspect any agent; a non-reviewer agent is always narrowed to their own card. Sister surface to the regression-style quality trend at GET /quality/trends and the compliance queue at GET /quality/compliance-flags. Read-only.
string
Look-back window in days over each evaluation’s creation time (1–90). Defaults to 30, capped at 90; an out-of-range or non-numeric value falls back to 30.
string
Restrict the rollup to one agent. Defaults to every evaluated agent (or only the caller themselves for a non-reviewer user). An over-long value falls back to the all-agents view.
string
Max agent cards returned (1–50). Defaults to 50, clamped to 50; an out-of-range or non-numeric value falls back to 50.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List coaching-rules

GET /api/v1/quality/coaching-rules
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Compliance-flagged QA evaluations queue

GET /api/v1/quality/compliance-flags
Newest-first list of official QA evaluations whose flagged_for_review bit is set — the auto-scorer’s below-threshold signals that need supervisor resolution. Reviewer scope (owner / admin / supervisor) may inspect any agent’s flags; a non-reviewer agent only ever sees their own. Read-only.
string
Look-back window in days over the evaluation’s creation time (1–90). Defaults to 30, capped at 90; an out-of-range or non-numeric value falls back to 30.
string
Restrict the queue to one agent. Defaults to every evaluated agent (or only the caller for non-reviewer users). An over-long value falls back to all agents.
string
Max flagged rows returned (1–100). Defaults to 50, clamped to 100; an out-of-range or non-numeric value falls back to 50.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Per-criterion QA driver averages

GET /api/v1/quality/drivers
Worst-first rollup of every scorecard criterion (rubric line) over official reviewer-authored QA evaluations — eval volume plus raw and normalised 0–100 averages per driver, labelled from the form definitions. Answers ‘which scorecard lines drive quality down’ on the scorecard pipeline; pairs with the per-day trend at GET /quality/trends. Self-evaluations and appealed/resolved rows are excluded so only current official scores drive the rollup. Read-only; requires an owner, admin, or supervisor role.
string
Look-back window in days over each evaluation’s creation time (1–90). Defaults to 30, capped at 90; an out-of-range or non-numeric value falls back to 30.
string
Restrict the rollup to a single scorecard form (rubric) id from /quality/evaluation-forms. Defaults to every form; an over-long value falls back to all forms.
string
Drill the driver rollup into one evaluated agent’s scores. Defaults to every agent; an over-long value falls back to all agents.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List evaluation forms

GET /api/v1/quality/evaluation-forms
List the tenant’s QA scorecard templates, most-recently-updated first. Filter with is_active to show only live rubrics, and cap the page size with limit. Reviewer scope (owner / admin / supervisor).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get an evaluation form

GET /api/v1/quality/evaluation-forms/{id}
Fetch a single QA scorecard template by id, including its full weighted section/criteria definition. Use this to render the rubric before authoring an evaluation or to review a form’s configuration. Reviewer scope (owner / admin / supervisor).
string
required
—
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List evaluations

GET /api/v1/quality/evaluations
List QA evaluations for the tenant with keyset pagination. Reviewer-scope callers may filter by any agent, call, reviewer, status, or provenance (auto-scored / flagged / CSAT-triggered / self vs reviewer); a non-reviewer agent only ever sees their own evaluations. Each row carries the derived evaluation_type and any linked CSAT score for the same call.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Compare self vs reviewer scores for a call

GET /api/v1/quality/evaluations/variance
Return the self-evaluation, the reviewer evaluation, and the per-criterion variance between them for a single call — the calibration gap that surfaces where an agent over- or under-rates their own work. call_id is required; un-graded auto-sampled / CSAT placeholder rows are excluded from the reviewer side. A non-reviewer agent only ever sees their own variance, while reviewer scope (owner / admin / supervisor) may pass agent_id to inspect any agent.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Per-evaluator QA assignment workload

GET /api/v1/quality/evaluations/workload
List every eligible evaluator (owner/admin) with their current open-assignment count, the tenant’s per-evaluator quota, remaining capacity, and how many of their open assignments are overdue against the tenant’s due-date window. Filter to one evaluator with evaluator_id. Reviewer scope (owner / admin / supervisor).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get gamification config defaults

GET /api/v1/quality/gamification/config
Return the default agent-engagement ruleset — the scorable metric keys, the point rules that convert KPIs into points, and the threshold badge definitions. Use this to render and pre-fill the supervisor config screen before tuning a ruleset and previewing it via the leaderboard endpoint. Reviewer scope (owner / admin / supervisor).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get my gamification card

GET /api/v1/quality/gamification/me
An agent reads THEIR OWN performance card — points, earned badges, and anonymised org rank — for a named lookback period (defaults to week). The rank is computed against the full org roster with the DEFAULT ruleset, identical to the supervisor default board, so an agent’s rank can never disagree with the supervisor view; only the caller’s own slice is returned, never another agent’s identity. Any authenticated agent scope: reviewer-scope roles (owner / admin / supervisor) may pass agent_id to inspect another agent, while a non-reviewer asking for someone else’s card gets a 403.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Search the post-call recording/transcript library

GET /api/v1/quality/recording-library
List the tenant’s recordings with keyset pagination, optionally searching the finalised diarised transcript segments by substring and filtering by classification, transcription/QC status, score range, and QA provenance. Each hit carries the linked QA evaluation’s latest score and the recording QC verdict, plus the top transcript fragments matching q. Reviewer scope (owner / admin / supervisor) because both transcript content and cross-agent QA scores are surfaced.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Org-wide quality-management summary

GET /api/v1/quality/summary
Cross-channel quality-management rollup for supervisors and admins — aggregates LLM-judged conversation outcomes across inbox and voice into one org-wide view. Returns overall totals (conversations scored, pass rate, average judge confidence), a per-channel breakdown, the top rubrics by evaluation volume with their pass rates, and the most recent low-confidence failures for triage. Use it to power a Quality Management overview page instead of navigating agent-by-agent. Read-only; requires an owner, admin, or supervisor role.
string
Look-back window in days over each outcome’s evaluation time (1–90). Defaults to 30, capped at 90; an out-of-range or non-numeric value falls back to 30.
string
Restrict the rollup to a single conversation channel — inbox, voice, or all for both. Defaults to all; any unrecognised value falls back to all.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Org-wide QA score trend series

GET /api/v1/quality/trends
Time series of official reviewer-authored QA evaluation scores — per-day averages plus per-agent and per-scorecard-form breakdowns. Answers ‘is quality trending up?’ against the scorecard rubrics an org actually grades with; pairs with the point-in-time rollup at GET /quality/summary. Self-evaluations (agent scoring their own call) and appealed/resolved rows are excluded so only current official scores drive the trend. Read-only; requires an owner, admin, or supervisor role.
string
Look-back window in days over each evaluation’s creation time (1–90). Defaults to 30, capped at 90; an out-of-range or non-numeric value falls back to 30.
string
Restrict the trend to a single scorecard form (rubric) id from /quality/evaluation-forms. Defaults to every form; an over-long value falls back to all forms.
string
Drill the whole trend into one evaluated agent’s scores. Defaults to every agent; an over-long value falls back to all agents.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Create a calibration session

POST /api/v1/quality/calibrations
Open a QM calibration session pinned to one call and one evaluation form, and invite a roster of reviewers. The creator is always added to the roster. If the call already has an AI auto-scored evaluation against the same form, that score is copied in read-only as a drift baseline. Reviewer scope (owner / admin / supervisor).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
string
required
Evaluation form to calibrate against (must be active).
string
required
Call the roster will score.
string
Optional human-readable session title.
string[]
Invited reviewer ids. De-duplicated server-side; the creator is added implicitly.

Close a calibration session

POST /api/v1/quality/calibrations/{id}/close
Close an open calibration session. Idempotency-guarded: closing an already-closed session returns 409. Reviewer scope (owner / admin / supervisor).
string
required
Calibration session identifier.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Submit a blind calibration score

POST /api/v1/quality/calibrations/{id}/scores
Submit your blind score for a calibration session. One submission per reviewer — a second attempt returns 409. total_score is re-derived server-side from the form weights; clients cannot supply it. The session must be open and you must be an invited reviewer. Reviewer scope (owner / admin / supervisor).
string
required
Calibration session identifier.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
object
required
Map of criterion_id → raw score (0–100). The server re-derives the weighted total against the form definition.

Create an evaluation form

POST /api/v1/quality/evaluation-forms
Create a QA scorecard template — the weighted sections and criteria a reviewer grades a call against. Use this to author a new rubric before any evaluations can be scored against it; set sample_rate_pct above 0 to have the auto-sampler queue a share of each agent’s calls for review. Reviewer scope (owner / admin / supervisor).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Create an evaluation

POST /api/v1/quality/evaluations
Author a reviewer evaluation of one agent’s call against a scorecard form. Post per-criterion raw scores (criterion id → 0..100); the server re-derives the weighted total_score from the form so clients cannot inflate the rollup. The row lands pending for the agent to acknowledge or appeal. Reviewer scope (owner / admin / supervisor).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Acknowledge an evaluation

POST /api/v1/quality/evaluations/{id}/acknowledge
The evaluated agent acknowledges a reviewer’s score, moving it from pending to acknowledged. Only the agent named on the evaluation may acknowledge it; already-acknowledged rows are idempotent. No request body.
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Appeal an evaluation

POST /api/v1/quality/evaluations/{id}/appeal
The evaluated agent appeals a reviewer’s score with a written note, moving it to appealed for a supervisor to resolve. Only the agent named on the evaluation may appeal, and only while it is pending or acknowledged.
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Claim and score an auto-queued evaluation

POST /api/v1/quality/evaluations/{id}/claim-score
A reviewer picks up a system-queued placeholder evaluation (auto-sampled or CSAT-triggered, still un-graded at score 0) and fills in the real per-criterion scores. The server re-derives total_score from the form weights and stamps the reviewer as the author; status stays pending so the agent’s acknowledge/appeal flow proceeds on a real score. Human-authored rows cannot be claimed. Reviewer scope (owner / admin / supervisor).
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Override an AI-scored evaluation

POST /api/v1/quality/evaluations/{id}/override
A reviewer corrects an AI/auto-scored evaluation by replacing its per-criterion scores with their own. The server re-derives total_score from the form weights, stamps the reviewer as the author, and clears the review flag. Only a pending, auto-scored row may be overridden — human-authored or already-corrected evaluations return 409. Reviewer scope (owner / admin / supervisor).
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Reassign an open evaluation to a different evaluator

POST /api/v1/quality/evaluations/{id}/reassign
Move an existing OPEN (pending, unscored) evaluation-assignment queue item to a different assignee_id — workload rebalancing. Only an unscored pending row may be reassigned (409 INVALID_STATE otherwise); the new assignee is subject to the same per-evaluator quota as POST /evaluations/assign. Reviewer scope (owner / admin / supervisor).
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Resolve an appealed evaluation

POST /api/v1/quality/evaluations/{id}/resolve
A supervisor closes an appealed evaluation, moving it from appealed to resolved with an optional resolution note. Resolving closes the appeal; it does NOT regrade the call (total_score is left untouched). Only an appealed evaluation may be resolved. Reviewer scope (owner / admin / supervisor).
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Assign a QA evaluation to a specific evaluator

POST /api/v1/quality/evaluations/assign
Create a new OPEN evaluation-assignment queue item for call_id against form_id, naming assignee_id as the reviewer. Rejects with 409 QUOTA_EXCEEDED if the assignee already holds the tenant’s per-evaluator open-assignment cap, and 409 ALREADY_ASSIGNED if the call already has an open (unscored) row. The row lands pending/unscored — the assignee fills in scores via the existing claim-score flow. Reviewer scope (owner / admin / supervisor).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Create a self-evaluation

POST /api/v1/quality/evaluations/self
An agent grades their OWN call against a scorecard form. Post per-criterion raw scores (criterion id → 0..100); the server re-derives the weighted total_score from the form so the rollup cannot be inflated. The handler always stamps agent_id = reviewer_id to the caller, so an agent can only ever self-evaluate their own work, and the row lands acknowledged (no reviewer sign-off needed). Any authenticated agent scope.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Compute the agent leaderboard

POST /api/v1/quality/gamification/leaderboard
Compute the ranked agent leaderboard for a window and scope from existing QA, call-volume and CSAT aggregates. Narrow to a team with queue_id or an explicit agent_ids allow-list, and override point_rules / badge_definitions to preview a tuned ruleset before adopting it. Supervisors are limited to their mapped queues. Reviewer scope (owner / admin / supervisor).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Compute a weighted supervisor scorecard

POST /api/v1/quality/scorecards/composite
Compute per-agent supervisor scorecards from a REQUEST-supplied KPI definition: 1-10 KPI lines each picking a metric from the closed registry (QA score, handle time, calls answered, queue service level, CSAT, first-contact resolution), a direction, a target + guardband, and a weight. Each KPI line is normalized to a 0-100 attainment (goal met → 100 → progress → 0..100) and the composite is the weight-sum of the covered lines. Weights may be percentages or fractions — they normalise per request. Window is a named period (day|week|month) or an explicit from/to ISO pair; restrict to a team with queue_id or an explicit agent_ids allow-list. Supervisors are limited to their mapped queues. Reviewer scope (owner / admin / supervisor).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Update an evaluation form

PATCH /api/v1/quality/evaluation-forms/{id}
Partially update a QA scorecard template — rename it, replace its weighted definition, toggle is_active, or change sample_rate_pct. Only the fields you send are changed; at least one field is required. Reviewer scope (owner / admin / supervisor).
string
required
—
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.