---
title: "Update a collection"
method: PATCH
path: "/cms/collections/{collectionId}"
tags: ["CMS collections"]
---

# Update a collection

`PATCH /cms/collections/{collectionId}`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/cms/collections/{collectionId}`
- Auth: HTTP bearer

Updates `displayName` (1–200 characters), `description` (up to 2,000 characters; pass `null` to clear), and/or `slug` (a rename). A slug change fails with a conflict when another active collection in the website already uses it, and when the website has a published version the rename is validated against the published site’s content queries and rejected when it would break them.

## Path parameters

- `collectionId` string, required

## Request body

- object
  - `displayName` string
  - `description` string, nullable
  - `slug` string: New slug for the collection — a rename. Omit to keep the current slug. Must be unique among the website’s active collections; when the website has a published version the rename is validated against the published site’s content queries.

## Response `200`

The updated collection.

- object
  - `id` string, required: Unique collection id.
  - `websiteId` string, required: Id of the owning website.
  - `slug` string, required: URL-shaped identifier, unique among the website’s active collections. Lowercase letters, digits, and hyphens, starting with a letter; max 64 characters.
  - `displayName` string, required: Human-readable name, 1–200 characters.
  - `description` string, nullable, required: Optional description, up to 2,000 characters.
  - `createdAt` string, date-time, required: Creation timestamp.
  - `updatedAt` string, date-time, required: Last-modification timestamp.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `409`: The request conflicts with the current state of the resource.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
