> ## 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 Update Team Strategy Config

> Update a team's strategy generation template + output spec FK.

Both fields are independently clearable (empty string → NULL).
Spec is referenced by slug from the UI; the route resolves it to an
id. Unknown slugs return 400 — fail fast rather than silently
setting NULL on a typo.

Invalidates the team_type_service cache so the next strategy run
picks up the change without a process restart.

Audit-logged with action ``team.strategy_config_update``.



## OpenAPI

````yaml /openapi.json patch /api/v1/admin/teams/{slug}/strategy-config
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/teams/{slug}/strategy-config:
    patch:
      tags:
        - Admin
      summary: Admin Update Team Strategy Config
      description: |-
        Update a team's strategy generation template + output spec FK.

        Both fields are independently clearable (empty string → NULL).
        Spec is referenced by slug from the UI; the route resolves it to an
        id. Unknown slugs return 400 — fail fast rather than silently
        setting NULL on a typo.

        Invalidates the team_type_service cache so the next strategy run
        picks up the change without a process restart.

        Audit-logged with action ``team.strategy_config_update``.
      operationId: >-
        admin_update_team_strategy_config_api_v1_admin_teams__slug__strategy_config_patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamStrategyConfigUpdate'
      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:
    TeamStrategyConfigUpdate:
      properties:
        strategy_generation_template:
          anyOf:
            - type: string
              maxLength: 50000
            - type: 'null'
          title: Strategy Generation Template
        strategy_output_spec_slug:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Strategy Output Spec Slug
        note:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Note
      additionalProperties: false
      type: object
      title: TeamStrategyConfigUpdate
      description: |-
        Partial update of a team's strategy-generation config.

        Both fields are optional (partial update) and clearable:
        - Empty string on ``strategy_generation_template`` clears it (NULL),
          letting the loader fall back to the on-disk file or generic spec.
        - Empty string on ``strategy_output_spec_slug`` clears the FK.

        The spec is referenced by slug rather than UUID so the admin UI can
        use a stable, human-readable handle. The route resolves the slug to
        an id on the way in.
    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

````