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

# Set Task Type State

> Upsert task-type override. state='live' deletes the row.

Invariant: `task_type_overrides` only contains non-default rows. A missing
row means "default = live" — so when an admin sets state back to live we
remove the override rather than store a redundant row.



## OpenAPI

````yaml /openapi.json patch /api/v1/admin/task-types/{category}/{task_type}/state
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/task-types/{category}/{task_type}/state:
    patch:
      tags:
        - Admin
      summary: Set Task Type State
      description: >-
        Upsert task-type override. state='live' deletes the row.


        Invariant: `task_type_overrides` only contains non-default rows. A
        missing

        row means "default = live" — so when an admin sets state back to live we

        remove the override rather than store a redundant row.
      operationId: >-
        set_task_type_state_api_v1_admin_task_types__category___task_type__state_patch
      parameters:
        - name: category
          in: path
          required: true
          schema:
            type: string
            title: Category
        - name: task_type
          in: path
          required: true
          schema:
            type: string
            title: Task Type
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskTypeStateChangeRequest'
      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:
    TaskTypeStateChangeRequest:
      properties:
        state:
          type: string
          enum:
            - draft
            - coming_soon
            - beta
            - live
            - hidden
          title: State
        note:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Note
      type: object
      required:
        - state
      title: TaskTypeStateChangeRequest
      description: |-
        Change state of a single task type override (category, task_type).

        state=`live` deletes any existing override so "missing row ≡ live"
        invariant is preserved.
    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

````