---
title: "Remap Chart Of Accounts"
method: POST
path: "/api/businesses/{business_id}/workbook/remap"
tags: ["Data Cleaning"]
---

# Remap Chart Of Accounts

`POST /api/businesses/{business_id}/workbook/remap`

## Request

- Base URL: `https://api.flagpost.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.flagpost.ai/api/businesses/{business_id}/workbook/remap`
- Auth: HTTP bearer

Re-run CoA mapping for one entity against the chart already in ``accounts``.

Applied journal entries are layered onto the internal balances during
mapping, so approving an AJE changes both the pairings and the deltas —
but nothing re-ran the agent afterwards. This is that trigger. It does not
re-extract: the external chart is read back from ``accounts``, so the
advisor's document set and any account retyping are left alone.

``entity_id`` is required. Mapping pairs one entity's internals against
that same entity's reported captions; a run without one summed every
entity's books together. ``period_key`` is the year to map — omit it to
let the resolver pick the year both sides share.

``reset`` clears this entity's existing matches first, including any the
advisor set by hand. A plain re-run only fills gaps, so this is the only
way to make the matcher reconsider what it already decided.

## Path parameters

- `business_id` string, required

## Query parameters

- `entity_id` string, required
- `period_key` string, nullable
- `reset` boolean

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

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