---
title: "Update Categories"
method: POST
path: "/categories/update"
tags: ["Products"]
---

# Update Categories

`POST /categories/update`

Rename and/or reparent categories by id. Each item sets `name` (rename), `parent_id` (move; null = promote to top level), or both — at least one is required. A combined edit is applied move-then-rename. Returns per-item results { updated, rejected } — the batch never fails as a whole. Rejection reasons: not_found, name_conflict, invalid_move (would nest a category inside itself).

## Request body

- object
  - `project_id` string — Required if using a company api key
  - `categories` object[], required
    - `category_id` string, uuid, required
    - `name` string
    - `parent_id` string, uuid, nullable

## Response `200`

Per-item update results

- object — Per-item update results
  - `updated` object[], required
    - `category_id` string, uuid, required
  - `rejected` object[], required
    - `category_id` string, uuid, required
    - `reason` 'not_found' | 'name_conflict' | 'invalid_move', required
    - `message` string, required

---

[API](https://skmtc.net/peec/apis/peec-ai-customer-api.md) · [All operations](https://skmtc.net/peec/apis/peec-ai-customer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/peec/peec-ai-customer-api/revisions/92840a1bffa7/schema)
