workflow_runs.post_call_data into aggregate charts, health metrics, drill-downs, and CSV exports. They power the Extraction Variable charts and the Extraction Health panel on the analytics dashboard.
All endpoints are GET, mounted under /api/v1/analytics/post-call-variables/, and scoped to the caller’s currently selected organization. Every requested workflow_id is validated against that organization — an id from another org returns 404 so existence is not leaked.
Authenticate with your PeachDesk API key:An interactive session token (
Authorization: Bearer …) also works — that is
what the dashboard uses — but the API key is the credential for programmatic
access. See Authentication.Data pipeline
Where the numbers come from, at a glance:- Workflow config — Each workflow defines a list of
PostCallExtractionFieldentries (id,name,type, optionaloptions,description,optional) underworkflow_configurations.post_call_extraction.fields. The four supported types areboolean,selector,number, andtext. - Post-call LLM extraction — After a call ends, the extraction task runs an LLM over the transcript and produces a value per configured field. If extraction fails for a row, an
errormarker is written instead of a value. - JSONB storage — The result lands on
workflow_runs.post_call_dataas{ "model": "...", "data": { "<field_name>": <value>, ... }, "error"?: "..." }. - Aggregation — These endpoints read
post_call_data.data.<field_name>across the filtered window (date range, workflow ids, call attributes) and produce a shape appropriate for the field’s type.
Endpoints
Schema
List the extraction fields defined on one or more workflows, plus the cross-workflow intersection when multiple ids are supplied.
Aggregate
Type-discriminated aggregation of a single field: boolean counts, selector option counts, number histogram + stats, or text top-N.
Health
Per-field
null_pct and error_pct with a sparkline so extraction failures surface before they distort downstream charts.Drill-down
Cursor-paginated list of the individual runs behind a bar, segment, or histogram bucket.
CSV export
Stream the raw extracted values for the current filter as a formula-injection-safe CSV.
Single vs. cross-workflow mode
Every endpoint takesworkflow_ids as a comma-separated list. The mode is inferred from the length of that list:
- Single (
workflow_ids=42) — Operates on one workflow./schemareturns that workflow’s field list and noshared_fields./aggregateand/drilldownaccept any field defined on that workflow. - Cross (
workflow_ids=42,43,44) — Intersects field names across all supplied workflows. A field is “shared” only if it exists on every workflow in the request. Types must also match; a field with the same name but different types on two workflows is dropped from the shared set. Forselectorfields the sharedoptionslist is the intersection of options across workflows.
/aggregate, /health, /drilldown, and /export.csv in cross mode operate on the union of the runs belonging to the requested workflows, keyed on the shared field name.
When to use cross-workflow
1. Agent version comparisons
1. Agent version comparisons
Charting
qualified (boolean) across v1_qualifier and v2_qualifier workflow ids lets you compare qualification rate between two versions of the same script on a single chart.2. Regional variants
2. Regional variants
us_intake, uk_intake, and au_intake share the same extraction schema. Cross-workflow mode gives you a single distribution of age_bracket (selector) across all three deployments.3. A/B experiments
3. A/B experiments
Same schema, different prompts or voices. Cross-workflow mode aggregates the
sentiment_after_ask (selector) result so you can see which variant produces more positive replies without merging the runs table.4. Portfolio dashboards
4. Portfolio dashboards
Fleet-wide “qualified rate” across every intake workflow in the org, updated as new workflows are added — the aggregate re-uses the intersecting field name and simply widens as more workflows opt in.
5. Extraction-drift monitoring
5. Extraction-drift monitoring
Pair
/health with the aggregate chart to catch silent extraction regressions. If error_pct or null_pct climbs on one workflow while the others stay flat, the aggregate number is misleading — the health row surfaces the drift before you act on the chart.Field types and chart shapes
For every type,
/aggregate and /health also return null_count and error_count so extraction failures are never silently folded into a chart’s headline number.
Call-attribute filters
Every endpoint except/schema accepts the same optional call-attribute filters, applied on top of the date range and workflow selection. They mirror the fields on the analytics RunFact:
Combine any subset. All missing filters mean “no restriction on this attribute”.
Date range
from and to are ISO 8601 timestamps. When both are omitted, the default window is the last 30 days ending at the current time. An inverted range (from > to) returns 400.
Related
/api/v1/organizations/usage/runsacceptspost_call_field,post_call_value, andpost_call_value_min/post_call_value_maxso the drill-down URL emitted by the extraction charts loads the underlying runs — see List runs with usage.

