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

# Set Routing Weights

> Set A/B routing weights on a phone number.



## OpenAPI

````yaml /openapi.json put /v1/phone-numbers/{phone_number_id}/routing
openapi: 3.1.0
info:
  title: TurnCall
  description: Production voice agent platform API
  version: 0.1.0
servers: []
security: []
paths:
  /v1/phone-numbers/{phone_number_id}/routing:
    put:
      tags:
        - phone-numbers
      summary: Set Routing Weights
      description: Set A/B routing weights on a phone number.
      operationId: set_routing_weights_v1_phone_numbers__phone_number_id__routing_put
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Phone Number Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetRoutingWeightsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Set Routing Weights V1 Phone Numbers  Phone Number
                  Id  Routing Put
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SetRoutingWeightsRequest:
      properties:
        weights:
          items:
            $ref: '#/components/schemas/RoutingWeightEntry'
          type: array
          maxItems: 10
          minItems: 2
          title: Weights
      type: object
      required:
        - weights
      title: SetRoutingWeightsRequest
      description: Request to set A/B routing weights on a phone number.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RoutingWeightEntry:
      properties:
        agent_id:
          type: string
          format: uuid
          title: Agent Id
        weight:
          type: integer
          maximum: 100
          minimum: 1
          title: Weight
      type: object
      required:
        - agent_id
        - weight
      title: RoutingWeightEntry
      description: A single entry in A/B routing weights.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````