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

# Per Artifact Approve

> POST /courses/{id}/review/approve  (S2.1)

Approve a single artifact identified by the ArtifactRef body.
Calls course_reviews.approve, which:
  - upserts status='approved'
  - when the prior status was 'note': flips note_resolved=TRUE and marks
    the matching courses.feedback entry resolved=TRUE (S2.3 resolved marking,
    already in S1's approve implementation).

reviewer is stamped as 'human:<client_id>' (QC hook: design section 17 says
the reviewer field is the hook; no separate QC route needed).

Phase 2 / Wave 1: returns {approved, artifact}. NO enqueue.
The trigger-chain (gen_audio, assemble_module, finalize) is Phase 3 (S3).



## OpenAPI

````yaml /openapi.yaml post /api/v1/courses/{course_id}/review/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}/review/approve:
    post:
      tags:
        - B2B Courses v2
      summary: Per Artifact Approve
      description: >-
        POST /courses/{id}/review/approve  (S2.1)


        Approve a single artifact identified by the ArtifactRef body.

        Calls course_reviews.approve, which:
          - upserts status='approved'
          - when the prior status was 'note': flips note_resolved=TRUE and marks
            the matching courses.feedback entry resolved=TRUE (S2.3 resolved marking,
            already in S1's approve implementation).

        reviewer is stamped as 'human:<client_id>' (QC hook: design section 17
        says

        the reviewer field is the hook; no separate QC route needed).


        Phase 2 / Wave 1: returns {approved, artifact}. NO enqueue.

        The trigger-chain (gen_audio, assemble_module, finalize) is Phase 3
        (S3).
      operationId: per_artifact_approve_api_v1_courses__course_id__review_approve_post
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: string
            title: Course Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArtifactRef'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ArtifactRef:
      properties:
        artifact_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Type
        module_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Module Index
        scene_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scene Index
        asset_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Asset Id
      type: object
      title: ArtifactRef
      description: |-
        Addressing a single reviewable artifact.

        Addressing modes:
          1. asset_id (int): look up (asset_type, module_index, scene_index) from
             course_assets and map asset_type to the ledger artifact_type.
          2. artifact_type + optional module_index + optional scene_index: direct
             logical addressing (used for outline/notes/quiz_question and for
             slide/audio when the caller knows the indices).

        Either asset_id or artifact_type must be present; if both are given,
        asset_id takes precedence.
    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

````