> ## 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.

# List Traffic Allocations



## OpenAPI

````yaml latest.yml GET /agents/{agent_id}/traffic-allocations
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-allocations:
    get:
      tags:
        - Agents
      summary: List Traffic Allocations
      operationId: agents_list-traffic-allocations
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
        - name: agent_id
          in: path
          description: The ID of the agent.
          required: true
          schema:
            type: string
        - name: starting_after
          in: query
          description: The allocation ID after which to start the page.
          schema:
            type: string
        - name: ending_before
          in: query
          description: >-
            The allocation ID before which to end the page. Cannot be combined
            with `starting_after`.
          schema:
            type: string
        - name: limit
          in: query
          description: The number of allocation revisions to return, from 1 to 100.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Traffic allocation revisions ordered from newest to oldest.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTrafficAllocationsResponse'
        '400':
          description: The pagination options are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
        '404':
          description: The agent does not exist.
          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:
    ListTrafficAllocationsResponse:
      title: ListTrafficAllocationsResponse
      type: object
      properties:
        data:
          type: array
          description: The requested page of immutable allocation revisions.
          items:
            $ref: '#/components/schemas/TrafficAllocation'
        has_more:
          type: boolean
          description: Whether another page is available.
        next_page:
          type: string
          nullable: true
          description: >-
            An allocation ID to pass as `starting_after` or `ending_before` to
            retrieve the next page.
      required:
        - data
        - has_more
        - next_page
    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
    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
    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

````