Traffic Allocations

Get traffic split metrics

Changed on

Per-assistant-version call metrics over a time window: call counts, configured vs actual traffic share, duration, cost per minute, latency, ended reasons, a bucketed timeseries, and optional structured output aggregations. Calls with no assistant version are reported as an 'unversioned' row.

get/traffic-allocations/metrics

Request

  • Base URL
    https://api.vapi.ai
  • Auth
    HTTP bearer

Query parameters

assistantIdstring required

The assistant whose per-version traffic metrics to return.

fromstring date-time required

Start of the metrics window (inclusive), ISO 8601 datetime.

tostring date-time required

End of the metrics window (exclusive), ISO 8601 datetime. Must be later than from, and the window may hold at most 2000 buckets of the requested width.

bucket'hour' | 'day'

Bucket size for the timeseries. Defaults to 'day'.

unknown

Structured output ids to aggregate per version, as an array or a comma-separated string. At most 5.

Response

totalCallsnumber required

All calls for the assistant in the window, every version.

Changes

Some revisions have not been checked yet.