---
title: "Get traffic split metrics"
method: GET
path: "/traffic-allocations/metrics"
tags: ["Traffic Allocations"]
---

# Get traffic split metrics

`GET /traffic-allocations/metrics`

## Request

- Base URL: `https://api.vapi.ai`
- URL: `https://api.vapi.ai/traffic-allocations/metrics`
- Auth: HTTP bearer

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.

## Query parameters

- `assistantId` string, required
- `from` string, date-time, required
- `to` string, date-time, required
- `bucket` 'hour' | 'day'
- `structuredOutputIds` unknown[]
  - unknown

## Response `200`

- TrafficTabMetricsDTO
  - `window` TrafficTabMetricsWindowDTO, required
    - `from` string, required: Start of the window (inclusive), ISO 8601.
    - `to` string, required: End of the window (exclusive), ISO 8601.
    - `bucket` 'hour' | 'day', required
  - `totalCalls` number, required: All calls for the assistant in the window, every version.
  - `currentAllocation` TrafficAllocation
    - `id` string, required: Unique identifier. The most recently created allocation for an assistant is the one in effect.
    - `orgId` string, required
    - `assistantId` string: The assistant this allocation splits calls for.
    - `allocationIntent` 'follow-latest' | 'explicit', required: 'explicit' splits calls across this allocation's targets. 'follow-latest' sends every call to the newest published version.
    - `createdAt` string, date-time, required: When this allocation was created, which is also when it took effect.
    - `actorType` 'user' | 'api-key' | 'system', required: Who created this allocation. 'system' means Vapi created it automatically, for example when a publish advances a follow-latest allocation.
    - `actorId` string: The user id or API key id that created this allocation. Absent for system rows.
    - `actorEmail` string: Email of the user who created this allocation, as of that time.
    - `description` string: The note given when this allocation was created, if any.
    - `targets` TrafficAllocationTarget[], required: The versions this allocation splits calls across, in position order. Empty for follow-latest allocations.
      - `assistantVersion` string, required: The assistant version this target sends calls to, such as "v7".
      - `position` number, required: The target's place in the split, starting at 0. Set from the order of the targets array.
      - `percentage` number, required: Share of calls sent to this version, from 0 to 100 with up to three decimal places. Targets add up to exactly 100. A 0% target keeps the version in the split without sending it calls.
  - `versions` TrafficTabVersionMetricsDTO[], required: One row per version with calls in the window, plus the unversioned row when it has any. Ordered by calls descending, then by version label (numeric-aware), the unversioned row last among equals.
    - `assistantVersionId` string, uuid, nullable
    - `assistantVersionLabel` string, nullable: The published version label, such as "v7". Null when no version row resolves (unversioned calls, or a since-purged version).
    - `unversioned` boolean: True for the row aggregating calls with no assistant version (stored as SQL NULL).
    - `calls` number, required
    - `configuredPercentage` number, nullable: The version's share in the currently-governing allocation. Null when the version is not in the current split — never rendered as 0%.
    - `actualPercentage` number, required: calls / totalCalls * 100 over the window, rounded to 3 decimals.
    - `durationSeconds` TrafficTabDurationSecondsDTO, required
      - `mean` number, nullable
      - `stddev` number, nullable
      - `p50` number, nullable
      - `p95` number, nullable
    - `costPerMinute` TrafficTabCostPerMinuteDTO, required
      - `mean` number, nullable
      - `breakdown` TrafficTabCostBreakdownPerMinuteDTO, required
        - `llm` number, nullable
        - `stt` number, nullable
        - `tts` number, nullable
        - `vapi` number, nullable
        - `transport` number, nullable
    - `latencyMs` TrafficTabLatencyMsDTO, required
      - `model` TrafficTabLatencyStatsDTO, required
        - `mean` number, nullable
        - `p50` number, nullable
        - `p95` number, nullable
      - `voice` TrafficTabLatencyStatsDTO, required
        - `mean` number, nullable
        - `p50` number, nullable
        - `p95` number, nullable
      - `transcriber` TrafficTabLatencyStatsDTO, required
        - `mean` number, nullable
        - `p50` number, nullable
        - `p95` number, nullable
      - `turn` TrafficTabLatencyStatsDTO, required
        - `mean` number, nullable
        - `p50` number, nullable
        - `p95` number, nullable
    - `endedReasons` TrafficTabEndedReasonCountDTO[], required: Full per-reason counts; the UI unions and top-Ns.
      - `reason` string, required
      - `count` number, required
    - `timeseries` TrafficTabTimeseriesPointDTO[], required
      - `bucketStart` string, required: Start of the bucket, ISO 8601 (UTC).
      - `calls` number, required
      - `durationSecondsMean` number, nullable
      - `costPerMinuteMean` number, nullable
      - `turnLatencyMsMean` number, nullable
    - `structuredOutputs` TrafficTabStructuredOutputDTO[]: Present only when structuredOutputIds was given.
      - `structuredOutputId` string, required
      - `type` 'number' | 'string' | 'boolean' | 'unknown', required
      - `present` number, required: Calls in the window where this output produced a result.
      - `numeric` TrafficTabStructuredOutputNumericDTO
        - `mean` number, nullable
        - `stddev` number, nullable
        - `p50` number, nullable
        - `p95` number, nullable
        - `sum` number, nullable
      - `valueCounts` TrafficTabStructuredOutputValueCountDTO[]: Top 10 values by count, for string/boolean outputs.
        - `value` string, required
        - `count` number, required

## Other responses

- `400`: assistantId is missing or not a UUID, from/to are missing, malformed, or inverted, the window spans more than 2000 buckets, or structuredOutputIds has more than 5 entries or a non-UUID entry.
- `403`: Traffic splitting is not enabled for your organization. The feature is in beta, rolling out to select organizations.

## Changes

> 164 revisions in range; 15 not diffed, 8 could not be searched.

- **2026-10-21** `5d17b7335816`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vapiai/apis/vapi-api/changes/traffic-allocations/metrics/get.md)

---

[API](https://skmtc.dev/vapiai/apis/vapi-api.md) - [All operations](https://skmtc.dev/vapiai/apis/vapi-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vapiai/apis/vapi-api/revisions/d73a715574fb?raw)
