---
title: "Update category"
method: PATCH
path: "/v1/categories/{identifier}"
tags: ["Categories"]
---

# Update category

`PATCH /v1/categories/{identifier}`

Update an existing category by ID or slug. Requires a private API key.

## Path parameters

- `identifier` string, required — Category ID or slug

## Request body

- UpdateCategoryBody
  - `name` string
  - `slug` string
  - `description` string, nullable

## Response `200`

Category updated successfully

- CreateCategoryResponse
  - `category` object, required
    - `id` string, required
    - `name` string, required
    - `slug` string, required
    - `description` string, nullable, required

## Other responses

- `400` — Invalid request body
- `403` — Public API key used for write operation
- `404` — Category not found
- `409` — Category with this slug already exists
- `500` — Server error

---

[API](https://skmtc.dev/marblecms/apis/marble-api.md) · [All operations](https://skmtc.dev/marblecms/apis/marble-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/marblecms/marble-api/revisions/ce3a22722c0e/schema)
