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

# Admin Set Team Type V2 Routing

> Set the per-team-type v2 routing override.

`default` clears the override (NULL) — env-flag resolution drives
routing for that slug. `v1` / `v2` force a specific orchestrator
regardless of env flags. See
`app/services/team_v2_routing.should_route_team_to_v2`.

Audit-logged via `admin_audit_log` with action
`team.v2_routing_change`.



## OpenAPI

````yaml /openapi.json patch /api/v1/admin/team-types/{slug}/v2-routing
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/team-types/{slug}/v2-routing:
    patch:
      tags:
        - Admin
      summary: Admin Set Team Type V2 Routing
      description: |-
        Set the per-team-type v2 routing override.

        `default` clears the override (NULL) — env-flag resolution drives
        routing for that slug. `v1` / `v2` force a specific orchestrator
        regardless of env flags. See
        `app/services/team_v2_routing.should_route_team_to_v2`.

        Audit-logged via `admin_audit_log` with action
        `team.v2_routing_change`.
      operationId: >-
        admin_set_team_type_v2_routing_api_v1_admin_team_types__slug__v2_routing_patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamTypeV2RoutingRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TeamTypeV2RoutingRequest:
      properties:
        v2_routing:
          type: string
          enum:
            - v1
            - v2
            - default
          title: V2 Routing
        note:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Note
      type: object
      required:
        - v2_routing
      title: TeamTypeV2RoutingRequest
      description: |-
        Per-team-type v2 routing override (Wave 2f).

        `default` clears the override (sets `team_type_registry.v2_routing` to
        NULL) — env-flag resolution then drives routing for that slug.
        `v1` / `v2` force a specific orchestrator regardless of env flags.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````