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

# Create Assignment

> Assign a form to a category/task_type.



## OpenAPI

````yaml /openapi.json post /api/v1/brief-forms/assignments
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brief-forms/assignments:
    post:
      tags:
        - Brief Forms
      summary: Create Assignment
      description: Assign a form to a category/task_type.
      operationId: create_assignment_api_v1_brief_forms_assignments_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BriefFormAssignmentRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BriefFormAssignmentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BriefFormAssignmentRequest:
      properties:
        form_id:
          type: string
          format: uuid
          title: Form Id
        form_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Form Version
          description: NULL = always latest; set to pin a specific version
        team_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Team Id
          description: NULL = account-level default
        category:
          type: string
          maxLength: 50
          minLength: 1
          title: Category
        task_type:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Task Type
          description: NULL = entire category
      type: object
      required:
        - form_id
        - category
      title: BriefFormAssignmentRequest
      description: Assign a form to a category/task_type.
    BriefFormAssignmentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        form_id:
          type: string
          format: uuid
          title: Form Id
        form_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Form Version
        user_id:
          type: string
          format: uuid
          title: User Id
        team_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Team Id
        category:
          type: string
          title: Category
        task_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Type
        is_active:
          type: boolean
          title: Is Active
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - form_id
        - user_id
        - category
        - is_active
        - created_at
      title: BriefFormAssignmentResponse
      description: An assignment linking a form to a task type.
    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

````