---
title: "Classify transactions"
method: POST
path: "/api/onboarding/classify"
---

# Classify transactions

`POST /api/onboarding/classify`

## Request

- Base URL: `https://app.rightmoney.com`
- URL: `https://app.rightmoney.com/api/onboarding/classify`
- Auth: API key in header `X-RM-Agent-Key`

Triggers AI classification of the user's bank transactions into buckets (bills, lifestyle, income, ignore). This is idempotent — calling it again after classification returns immediately.

## Request body

- UserIdBody
  - `userId` string, uuid, required: The user's unique identifier

## Response `200`

Classification result

- ClassifyResponse
  - `success` boolean, required
  - `message` string
  - `classified` integer: Number of merchant patterns classified
  - `skipped` boolean: True if classifications already existed
  - `rulesCreated` integer: Number of high-confidence merchant rules created
  - `totalTransactions` integer: Total transactions analyzed
  - `merchantPatterns` integer: Unique merchant patterns found

## Other responses

- `400`: Invalid request
- `401`: Invalid or missing API key
- `503`: Database not configured

---

[API](https://skmtc.dev/rightmoney/apis/right-money-agent-api.md) · [All operations](https://skmtc.dev/rightmoney/apis/right-money-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rightmoney/apis/right-money-agent-api/revisions/244b5180a5ff?raw)
