---
title: "Start Auto Categorise"
method: POST
path: "/claims/{claim_id}/expenditures/auto-categorise"
tags: ["expenditures"]
---

# Start Auto Categorise

`POST /claims/{claim_id}/expenditures/auto-categorise`

## Request

- Base URL: `https://api.claimkit.co` (the document declares no server; this is the origin it was published from)
- URL: `https://api.claimkit.co/claims/{claim_id}/expenditures/auto-categorise`
- Auth: none declared

Start an AI auto-categorisation run over the selected items and return a
job to poll.

Admin-only: AI categorisation is an internal review tool, so regular users
(customers) are blocked at the API (``get_admin_user`` → 403), not just in
the UI. ``get_admin_user`` checks the real session user, so an admin
impersonating a customer can still run it.

Classified rows get a ``category`` (and, when ``include_eligibility``, an R&D
``eligibility``) and are flagged ``auto_categorised`` — the AI path never sets
``manual_override`` and never assigns a project/activity. Synthetic salary ids
and ids not resolving to a live item on this claim are dropped (the
claim-scoped query is the authorization boundary), so ``total`` reflects only
real, processable rows.

## Path parameters

- `claim_id` integer, required

## Request body

- AutoCategoriseRequest
  - `item_ids` integer[], required
  - `include_eligibility` boolean

## Response `200`

Successful Response

- AutoCategoriseJobResponse
  - `job_id` integer, required
  - `status` string, required
  - `total` integer, required
  - `processed` integer, required
  - `updated_count` integer, required
  - `failed_count` integer, required
  - `error` string, nullable
  - `item_ids` integer[]

## Other responses

- `422`: Validation Error

---

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