---
title: "Update published courses"
method: PATCH
path: "/v2/published-courses/"
tags: ["Published Courses"]
---

# Update published courses

`PATCH /v2/published-courses/`

Update up to ``BATCH_MAX_ITEMS`` published courses in a single request.

``course`` / ``domain`` cannot change after publish and are not accepted here.
Returns 200 if all items succeed, 207 if any fail, 400 if empty or over the cap.

**Required OAuth scope:** `published-courses:write`

## Request body

- PublishedCourseUpdateRequestEnvelope — JSON:API envelope for PATCH /v2/published-courses (update one or many).
  - `data` PublishedCourseUpdateData[], required — Published-course items to update.
    - `type` 'published-courses', required — Must be "published-courses".
    - `id` string, required — Opaque id of the published course to update.
    - `attributes` PublishedCourseUpdateAttributes, required — Writable attributes on update (PATCH). ``slug`` is create-only and not accepted here.
      - `is_hidden` boolean, nullable — Hide from the catalog.
      - `visible_on_catalog` boolean, nullable — Show on the domain catalog.
      - `open_access` boolean, nullable — Allow anonymous access.
      - `strict_enforce_group_visibility` boolean, nullable
      - `visibility_override_type` 'GROUP' | 'CATEGORY', nullable — GROUP or CATEGORY.
      - `access_period_starts_at` string, date-time, nullable — Registration window start; null clears it.
      - `access_period_ends_at` string, date-time, nullable — Registration window end; null clears it.
      - `restrict_access_start_end_dates` boolean, nullable
      - `allow_self_service_reenroll` boolean, nullable
      - `unique_progress_per_enrollment` boolean, nullable
      - `require_all_prerequisites` boolean, nullable

## Response `200`

OK

- BatchResultEnvelopePublishedCourseResource
  - `data` union[], required — Per-item results in request order.
    - union
      - BatchSucceededItemPublishedCourseResource
        - `status` 'succeeded'
        - `id` string, nullable — Resource ID of the created or updated resource.
        - `result` PublishedCourseResource, required — JSON:API resource object for a published course.
          - `type` string — Always "published-courses".
          - `id` string, required — Opaque published-course ID. Use in URL paths.
          - `attributes` PublishedCourseAttributes, required — Attributes of a published-course resource object.
            - `external_id` string, required — Stable UUID5 for cross-system correlation.
            - `slug` string, required — URL path of the course on the domain. Unique per domain.
            - `live` boolean, required — Whether the course is currently published (live) on the domain.
            - `is_hidden` boolean, required — Hidden from the catalog; visible only to associated groups.
            - `visible_on_catalog` boolean, required — Whether the course shows on the domain catalog.
            - `open_access` boolean, required — Allow anonymous access (no registration). Disables per-user analytics when true.
            - `strict_enforce_group_visibility` boolean, required — Block access for students the course is not visible to.
            - `visibility_override_type` 'GROUP' | 'CATEGORY', required — Which visibility mode the course uses: GROUP or CATEGORY.
            - `access_period_starts_at` string, date-time, nullable — Start of the registration/enrollment window, or null.
            - `access_period_ends_at` string, date-time, nullable — End of the registration/enrollment window, or null.
            - `restrict_access_start_end_dates` boolean, required — Enforce the access window above.
            - `allow_self_service_reenroll` boolean, required — Let students re-enroll immediately on completion.
            - `unique_progress_per_enrollment` boolean, required — New progress record on each re-enroll.
            - `require_all_prerequisites` boolean, required — Require all prerequisites before enrolling.
            - `created_at` string, date-time, required — Creation timestamp.
            - `modified_at` string, date-time, required — Latest update timestamp.
          - `relationships` object, nullable — Related course and domain linkages.
          - `links` object, nullable — Self link.
      - BatchFailedItem — Wrapper for a failed item in a 207 batch response.
        - `status` 'failed'
        - `id` string, nullable — Echoed resource ID if the input identified a row.
        - `error` BatchItemError, required — Per-item error inside a 207 batch response. Aligned with JSON:API ``ErrorObject`` field naming (``code`` rather than ``reason``) so consumers can reuse error-handling logic across document-level errors (``ErrorObject`` in ``ErrorEnvelope``) and per-item errors (here). Differences from ``ErrorObject``: ``status``/``title`` are omitted because they're redundant for the 207-batch context (HTTP status is on the envelope, and the title is derivable from ``code``).
          - `code` 'duplicate_email' | 'duplicate_in_batch' | 'duplicate_name' | 'validation_error' | 'not_found' | 'internal_error' | 'not_in_domain' | 'already_enrolled' | 'already_published', required — Machine-readable error code.
          - `source` object, nullable — Pointer to the offending input slot, e.g. {"pointer": "/data/0/attributes/email"}.
          - `detail` string, nullable — Human-readable explanation of the error.
  - `summary` BatchSummary, required — Aggregate counts for a 207 batch response. Invariant: ``succeeded + failed == total``. Enforced by ``@model_validator``.
    - `total` integer, required — Total number of items submitted.
    - `succeeded` integer, required — Number of items that succeeded.
    - `failed` integer, required — Number of items that failed.

## Other responses

- `207` — Multi-Status
- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/skilljar/apis/skilljar-api-v2.md) · [All operations](https://skmtc.net/skilljar/apis/skilljar-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skilljar/skilljar-api-v2/revisions/f8025de20169/schema)
