---
title: "Update path items"
method: PATCH
path: "/v2/published-paths/{id}/path-items/"
tags: ["Published Paths"]
---

# Update path items

`PATCH /v2/published-paths/{id}/path-items/`

## Request

- Base URL: `https://api.skilljar.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.skilljar.com/v2/published-paths/{id}/path-items/`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/skilljar/apis/skilljar-api-v2/docs/v2/published-paths/:id/path-items/patch.ts> (a function with typed inputs; its response is checked against the schema)

Reorder path items in bulk. A row that fails is reported per item (207).

**Required OAuth scope:** `paths:write`

## Path parameters

- `id` string, required

## Request body

- PathItemUpdateRequestEnvelope: JSON:API envelope for PATCH /v2/published-paths/{id}/path-items/.
  - `data` PathItemUpdateData[], required
    - `type` 'path-items', required
    - `id` string, required
    - `attributes` PathItemUpdateAttributes, required
      - `order` integer, nullable

## Response `200`

OK

- BatchResultEnvelopePathItemResource
  - `data` union[], required: Per-item results in request order.
    - union
      - BatchSucceededItemPathItemResource
        - `status` 'succeeded'
        - `id` string, nullable: Resource ID of the created or updated resource.
        - `result` PathItemResource, required: JSON:API resource object for a path item.
          - `type` string: Always "path-items".
          - `id` string, required: Opaque path-item id.
          - `attributes` PathItemAttributes, required: Attributes of a path-item resource object.
            - `order` integer, required
            - `search_keywords` string, required: Search keywords of the item's course.
            - `created_at` string, date-time, required
          - `relationships` object, nullable
          - `links` object, nullable
      - 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' | 'already_in_path', 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
- `406`: Not Acceptable: Accept rules out application/vnd.api+json.
- `413`: Payload Too Large: the request body exceeds the maximum allowed size.
- `415`: Unsupported Media Type: Content-Type must be application/json or application/vnd.api+json.
- `422`: Unprocessable Entity

## Changes

- **2026-10-21** `16a566965a72`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/skilljar/apis/skilljar-api-v2/changes/v2/published-paths/:id/path-items/patch.md)

---

[API](https://skmtc.dev/skilljar/apis/skilljar-api-v2.md) - [All operations](https://skmtc.dev/skilljar/apis/skilljar-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/skilljar/apis/skilljar-api-v2/revisions/fbda30ce1742?raw)
