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

# Module Bulk Approve

> POST /courses/{id}/modules/{m}/approve  (S2.2)

Approve all pending artifacts for a single module in ONE transaction.
Optional body: {artifact_type?} to filter to one artifact kind.

Skip rules (design 13.4): rows with status='note' or status='stale' are
SKIPPED (not approved). Counts are reported in the response.

Bulk semantics: all-or-nothing. A mid-list failure rolls back ALL writes
for this call. jobs_enqueued is always [] in Phase 2; the trigger-chain
wiring is Phase 3 (S3).



## OpenAPI

````yaml /openapi.yaml post /api/v1/courses/{course_id}/modules/{module_index}/approve
openapi: 3.1.0
info:
  title: Mahara Platform
  description: >
    AI Sales Training Course Generator, a Coursera-style platform.


    ## Authentication


    Every request must carry your API key as a Bearer token:


    `Authorization: Bearer sk_live_your_key_here`


    ## Getting an API key


    API keys are provisioned by our team. They are not self-service, so there is
    no signup page to apply on. To request access, email **sales@myustadia.com**
    and we will issue a key for your account.
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/courses/{course_id}/modules/{module_index}/approve:
    post:
      tags:
        - B2B Courses v2
      summary: Module Bulk Approve
      description: |-
        POST /courses/{id}/modules/{m}/approve  (S2.2)

        Approve all pending artifacts for a single module in ONE transaction.
        Optional body: {artifact_type?} to filter to one artifact kind.

        Skip rules (design 13.4): rows with status='note' or status='stale' are
        SKIPPED (not approved). Counts are reported in the response.

        Bulk semantics: all-or-nothing. A mid-list failure rolls back ALL writes
        for this call. jobs_enqueued is always [] in Phase 2; the trigger-chain
        wiring is Phase 3 (S3).
      operationId: >-
        module_bulk_approve_api_v1_courses__course_id__modules__module_index__approve_post
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: string
            title: Course Id
        - name: module_index
          in: path
          required: true
          schema:
            type: integer
            title: Module Index
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkApproveRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BulkApproveRequest:
      properties:
        artifact_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Type
      type: object
      title: BulkApproveRequest
      description: Optional type filter for bulk approve endpoints.
    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

````