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

# Publish Course

> Publish a ready course to the owning account's org catalog.

Sets catalog_listed_at=NOW() on the caller's OWN course. Requires status
'ready' (a still-generating course has nothing to browse); a course in any
other status returns 400 (code not_ready). catalog_listed_at is
owner-writable (074 governance leaves it un-gated); the UPDATE runs under
the tenant's RLS scope so a non-owner or nonexistent course_id is 404
"Course not found" (opaque, does not distinguish the two).

Publishing does NOT set verified_at. When the owning org has
requires_verification, the course stays invisible on /api/v1/learn/catalog
until an admin verifies it separately (verified_at is admin-only,
non-owner-writable governance).

Returns 200 {id, catalog_listed_at}.



## OpenAPI

````yaml /openapi.yaml post /api/v1/courses/{course_id}/publish
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}/publish:
    post:
      tags:
        - B2B Courses
      summary: Publish Course
      description: >-
        Publish a ready course to the owning account's org catalog.


        Sets catalog_listed_at=NOW() on the caller's OWN course. Requires status

        'ready' (a still-generating course has nothing to browse); a course in
        any

        other status returns 400 (code not_ready). catalog_listed_at is

        owner-writable (074 governance leaves it un-gated); the UPDATE runs
        under

        the tenant's RLS scope so a non-owner or nonexistent course_id is 404

        "Course not found" (opaque, does not distinguish the two).


        Publishing does NOT set verified_at. When the owning org has

        requires_verification, the course stays invisible on
        /api/v1/learn/catalog

        until an admin verifies it separately (verified_at is admin-only,

        non-owner-writable governance).


        Returns 200 {id, catalog_listed_at}.
      operationId: publish_course_api_v1_courses__course_id__publish_post
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: string
            title: Course Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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

````