> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# Get latest traffic allocation

GET https://api.vapi.ai/traffic-allocations/latest

The allocation currently in effect for the assistant, with its targets. The response carries no allocation field when traffic splitting has never been configured. Traffic splitting is in beta, rolling out to select organizations; requests from organizations without access receive a 403.

Reference: https://docs.vapi.ai/api-reference/traffic-allocations/traffic-allocation-controller-latest-get

## Authentication

- `Authorization` header (bearer token, required) — Authenticate server-side requests with a private Vapi API key. Create or copy a key from the [Vapi Dashboard](https://dashboard.vapi.ai) and send it in the `Authorization` header as `Bearer <token>`. Keep private API keys out of client-side code and public repositories.

## Request

### Query parameters

- `assistantId` (string, required) — The assistant whose latest allocation to return.

## Response

### 200

- `allocation` (TrafficAllocation, optional) — The source's current configuration: the newest allocation row with its targets. Absent when the source has never been configured.

## Errors

### 400 Bad Request Error

assistantId is missing or is not a UUID.

- `any`

### 403 Forbidden Error

Traffic splitting is not enabled for your organization. The feature is in beta, rolling out to select organizations.

- `any`

## Types

### TrafficAllocation

- `id` (string, required) — Unique identifier. The most recently created allocation for an assistant is the one in effect.
- `orgId` (string, required)
- `allocationIntent` (enum, required) — 'explicit' splits calls across this allocation's targets. 'follow-latest' sends every call to the newest published version.
  - Allowed values: `follow-latest`, `explicit`
- `createdAt` (datetime, required) — When this allocation was created, which is also when it took effect.
- `actorType` (enum, required) — Who created this allocation. 'system' means Vapi created it automatically, for example when a publish advances a follow-latest allocation.
  - Allowed values: `user`, `api-key`, `system`
- `targets` (list of TrafficAllocationTarget, required) — The versions this allocation splits calls across, in position order. Empty for follow-latest allocations.
- `assistantId` (string, optional) — The assistant this allocation splits calls for.
- `actorId` (string, optional) — The user id or API key id that created this allocation. Absent for system rows.
- `actorEmail` (string, optional) — Email of the user who created this allocation, as of that time.
- `description` (string, optional) — The note given when this allocation was created, if any.

### TrafficAllocationTarget

- `assistantVersion` (string, required) — The assistant version this target sends calls to, such as "v7".
- `position` (double, required) — The target's place in the split, starting at 0. Set from the order of the targets array.
- `percentage` (double, 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.

## Examples

**Response**

```json
{
  "allocation": {
    "id": "string",
    "orgId": "string",
    "allocationIntent": "follow-latest",
    "createdAt": "2024-01-15T09:30:00Z",
    "actorType": "user",
    "targets": [
      {
        "assistantVersion": "string",
        "position": 1.1,
        "percentage": 1.1
      }
    ],
    "assistantId": "string",
    "actorId": "string",
    "actorEmail": "string",
    "description": "string"
  }
}
```