> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cartesia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Current Traffic Allocation



## OpenAPI

````yaml latest.yml GET /agents/{agent_id}/traffic-allocation
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /agents/{agent_id}/traffic-allocation:
    get:
      tags:
        - Agents
      summary: Get Current Traffic Allocation
      operationId: agents_get-current-traffic-allocation
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
        - name: agent_id
          in: path
          description: The ID of the agent.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The current traffic allocation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrafficAllocation'
        '404':
          description: The agent does not exist or has no active traffic allocation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-08-14'
        default: '2026-08-14'
        enum:
          - '2026-08-14'
  schemas:
    TrafficAllocation:
      title: TrafficAllocation
      type: object
      properties:
        id:
          type: string
          description: The unique ID of this immutable allocation revision.
        agent_id:
          type: string
          description: The agent whose calls use this allocation.
        revision:
          type: integer
          description: The agent's monotonically increasing allocation revision.
          minimum: 1
        targets:
          type: array
          description: >-
            Version targets in deterministic routing order. An empty list marks
            a cleared revision in allocation history.
          items:
            $ref: '#/components/schemas/TrafficAllocationTarget'
        assignment_strategy:
          $ref: '#/components/schemas/TrafficAllocationAssignmentStrategy'
        created_at:
          type: string
          format: date-time
          description: When this allocation revision was created.
        created_by:
          type: string
          description: ID of the user or API key that created this allocation revision.
      required:
        - id
        - agent_id
        - revision
        - targets
        - assignment_strategy
        - created_at
        - created_by
    PublicErrorResponse:
      type: object
      properties:
        doc_url:
          description: URL to relevant documentation for the error
          type: string
          nullable: true
        error_code:
          description: Machine-readable error code
          type: string
          nullable: true
        message:
          description: Detailed human-readable error message
          type: string
        request_id:
          description: >-
            Unique identifier for this request. Include this when contacting
            support.
          type: string
        title:
          description: Short human-readable error summary, like "File too large"
          type: string
      required:
        - request_id
        - message
        - title
      title: PublicErrorResponse
    TrafficAllocationTarget:
      title: TrafficAllocationTarget
      type: object
      properties:
        version_id:
          type: string
          description: The ID of an immutable version of this agent.
        percentage:
          type: number
          format: double
          description: The percentage of new calls assigned to this version.
          minimum: 0
          exclusiveMinimum: true
          maximum: 100
          multipleOf: 0.01
      required:
        - version_id
        - percentage
    TrafficAllocationAssignmentStrategy:
      title: TrafficAllocationAssignmentStrategy
      type: string
      enum:
        - sticky_by_caller
        - random_per_call
      description: >-
        How Cartesia assigns phone calls to version targets. `sticky_by_caller`
        keeps an external phone number on the same version while the traffic
        split stays the same. It uses the caller number for inbound calls and
        the destination number for outbound calls. `random_per_call` assigns
        each new phone call separately. Web calls that use traffic allocation
        are always assigned per call, so this setting does not affect them.
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).
      x-default: $CARTESIA_API_KEY

````