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

# Bulk Assign Courses

> Bulk assign courses to multiple assignments.

Requires admin role.



## OpenAPI

````yaml /openapi.json post /api/v1/learn/assignments/bulk/courses
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/learn/assignments/bulk/courses:
    post:
      tags:
        - learn-assignments
      summary: Bulk Assign Courses
      description: |-
        Bulk assign courses to multiple assignments.

        Requires admin role.
      operationId: bulk_assign_courses_api_v1_learn_assignments_bulk_courses_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkAssignCoursesRequestDTO'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkAssignCoursesResponseDTO'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BulkAssignCoursesRequestDTO:
      properties:
        assignmentIds:
          items:
            type: string
            format: uuid
          type: array
          title: Assignmentids
        courseIds:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Courseids
        curriculumId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Curriculumid
        dueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Duedate
      type: object
      required:
        - assignmentIds
      title: BulkAssignCoursesRequestDTO
      description: Request to bulk assign courses to multiple assignments.
    BulkAssignCoursesResponseDTO:
      properties:
        updatedCount:
          type: integer
          title: Updatedcount
        totalCoursesAssigned:
          type: integer
          title: Totalcoursesassigned
        totalDueDatesUpdated:
          type: integer
          title: Totalduedatesupdated
          default: 0
        failedAssignmentIds:
          items:
            type: string
            format: uuid
          type: array
          title: Failedassignmentids
          default: []
      type: object
      required:
        - updatedCount
        - totalCoursesAssigned
      title: BulkAssignCoursesResponseDTO
      description: Response from bulk course assignment.
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````