---
title: "documents.update-categories"
method: POST
path: "/capabilities/documents.update-categories"
tags: ["Capabilities"]
---

# documents.update-categories

`POST /capabilities/documents.update-categories`

## Request

- Base URL: `https://developer.api.receiptor.ai/v1`
- URL: `https://developer.api.receiptor.ai/v1/capabilities/documents.update-categories`
- Auth: one of:
  - API key in header `x-receiptor-api-key`
  - HTTP bearer

Preview or apply different category corrections to up to 50 known documents in one confirmation. Validates each company's chart and current category; reuses the standard document update behavior.

## Request body

- object
  - `updates` object[], required
    - `id` string, required
    - `expectedEntityId` string, required: Assigned entity.id returned by doc_get
    - `expectedChartOfAccountsId` string, required: Assigned entity.chartOfAccountsId returned by doc_get
    - `category` string, required: Exact account name or full displayName from the document company's chart_accounts_list
    - `chartAccountId` string: Exact account ID, when available
    - `expectedCategory` string, nullable, required: Current category from doc_get, or null when unset. Prevents overwriting a newer correction.
  - `dryRun` boolean: Preview the whole batch first; false opens confirmation before execution

## Response `200`

Successful response

- object
  - `success` boolean
  - `code` integer
  - `data` object
    - `result` object: Capability-specific result

## Other responses

- `400`: Invalid input
- `401`: Authentication required
- `404`: Resource not found

## Changes

- **2026-10-21** `b0fefd7d16a5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/receiptor/apis/receiptor-ai-api/changes/capabilities/documents.update-categories/post.md)

---

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