---
title: "Replace a transaction's saved category allocation overlay."
method: POST
path: "/v1/transactions/split"
---

# Replace a transaction's saved category allocation overlay.

`POST /v1/transactions/split`

## Request

- Base URL: `https://api.candor.money`
- URL: `https://api.candor.money/v1/transactions/split`
- Auth: HTTP bearer

Replace a transaction's saved category allocation overlay.

## Headers

- `Idempotency-Key` string, required

## Request body

- TransactionSplitRequest: Reallocates one transaction across categories. This is an overlay: the source evidence and its total are never changed, so the split is fully reversible.
  - `transaction_id` string, required: The canonical transaction this concerns.
  - `lines` object[], required: Every line replaces the previous allocation as a set. Amounts are unsigned and strictly greater than zero, and must account for the whole transaction, so a partial split is rejected rather than silently leaving a remainder. Drop a category rather than giving it a zero line.
    - `amount` string, required: Unsigned and greater than zero, as a plain decimal (12.34) or as Money in the transaction's currency (USD 12.34).
    - `category` string, required: The effective category this line governs.
    - `label` string
    - `note` string
  - `approval_note` string: What the user said about this split, in their words, when they said something. Optional; without it the action's reason is kept. How a charge should be divided reflects what it was for, which they know and you infer.
  - `approval_source` string: Where the user said it, such as the conversation or message it came from.
  - `set_by` string: Who made the change, when it was not you acting alone.

## Response `200`

Envelope with the active split and allocation lines.

- ResponseEnvelope
  - `schema_version` string, required
  - `generated_at` string, date-time, required
  - `request_id` string, required
  - `status` 'success' | 'partial_success' | 'action_required' | 'error', required
  - `user_message` string: Optional concise user-safe message the calling agent may adapt.
  - `data_freshness` DataFreshness
    - `balances_last_synced_at` string
    - `coverage` 'complete' | 'partial' | 'stale' | 'unavailable', required
    - `holdings_last_synced_at` string
    - `transactions_last_synced_at` string
  - `metadata` object: Response-level protocol metadata such as package compatibility and workspace opening identity or timing. It is not financial workspace data and must not be treated as attention.
    - `view_url` string, uri: Authenticated dashboard destination related to this response. May open a section rather than reproduce the returned records or filters. Per-record view_url values identify exact supported record views. Use returned URLs instead of constructing paths.
  - `warnings` object[], required
  - `errors` AgentError[], required
    - `code` string, required
    - `expires_at` string
    - `idempotency_key` string: Stable key to reuse when retrying this identical logical operation.
    - `message` string, required
    - `recovery_url` string, uri
    - `required_capability` string
    - `retry_after_seconds` integer: Machine-actionable delay before retrying the identical logical operation.
    - `retryable` boolean, required
    - `suggested_command` string
  - `next_actions` AgentAction[], required
    - `intent` string, required
    - `command` string, required
    - `args` object, required
    - `shell` string, required
  - `action` WorkspaceAction
    - `id` string, required
    - `operation` string, required
    - `reason` string, required
    - `root_action_id` string, required
    - `parent_action_id` string
    - `task_key` string
    - `status` 'started' | 'succeeded' | 'refused' | 'failed', required
    - `created_at` string, date-time, required
    - `completed_at` string, date-time
  - `data` object, nullable, required: Operation-specific result data, or null when the request ends in an error.

## Other responses

- `default`: Structured Candor error envelope with machine-readable codes, recovery guidance, and retry timing when applicable.

---

[API](https://skmtc.dev/candor/apis/candor-api.md) · [All operations](https://skmtc.dev/candor/apis/candor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/candor/apis/candor-api/revisions/6c050f72e956?raw)
