Publish one or more course sections AND the lessons they contain. Provide exactly one of target_ids (a nonempty array of course-section public IDs) or target_all: true to publish every unpublished non-root section of the course. Explicit target IDs must identify sections in this course. Targeting the root "Primary module" container (or using target_all) expands to every unpublished non-root section. A missing or empty courses_sections_publish_action wrapper is a malformed request and returns 400; a well-formed wrapper with a missing or conflicting selection, or an invalid/cross-course target ID, returns 422. If a root or target_all request has no unpublished content to publish, the response is 200 OK with a message (not an error).
The action runs asynchronously — poll with GET /api/v2/courses/sections/publish_actions/{id}. The status field is queued, scheduled, or processing while work remains and completed when it is done. Compare performed_count to target_count for section progress. published_lessons_count reports lesson publish states this action changed, excluding lessons already live.
Set auto_enroll: true to grant existing course enrollees access to the newly published sections. Pair with send_email: true to notify them.
Use scheduled_for (ISO 8601, must be a future datetime) to defer the publish.
See Publishing in the Courses Skill for when this bulk action is the right choice.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||