---
title: "Update Account"
method: PATCH
path: "/api/accounts/{account_id}"
tags: ["accounts"]
---

# Update Account

`PATCH /api/accounts/{account_id}`

## 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/accounts/{account_id}`
- Auth: HTTP bearer

## Path parameters

- `account_id` string, uuid, required

## Request body

- AccountUpdate
  - `code` string, nullable
  - `name` string, nullable
  - `account_type` 'asset' | 'liability' | 'equity' | 'income' | 'expense', nullable
  - `sub_type` 'bank' | 'accounts_receivable' | 'current_assets' | 'property_plant_equipment' | 'long_term_assets' | 'credit_card' | 'accounts_payable' | 'other_current_liabilities' | 'long_term_liabilities' | 'equity' | 'income' | 'other_income' | 'cogs' | 'expenses' | 'depreciation_amortization' | 'interest_expense' | 'income_taxes' | 'other_expense', nullable
  - `side` 'internal' | 'external', nullable
  - `is_calculation` boolean, nullable
  - `parent_account_id` string, uuid, nullable
  - `sort_order` number, nullable

## Response `200`

Successful Response

- AccountModel
  - `id` string, uuid, required
  - `advisory_id` string, uuid, nullable
  - `business_id` string, uuid, nullable
  - `databook_id` string, uuid, nullable
  - `code` string, nullable
  - `name` string, required
  - `account_type` 'asset' | 'liability' | 'equity' | 'income' | 'expense', required
  - `sub_type` 'bank' | 'accounts_receivable' | 'current_assets' | 'property_plant_equipment' | 'long_term_assets' | 'credit_card' | 'accounts_payable' | 'other_current_liabilities' | 'long_term_liabilities' | 'equity' | 'income' | 'other_income' | 'cogs' | 'expenses' | 'depreciation_amortization' | 'interest_expense' | 'income_taxes' | 'other_expense', required
  - `is_system` boolean
  - `side` 'internal' | 'external'
  - `is_calculation` boolean
  - `parent_account_id` string, uuid, nullable
  - `sort_order` number

## 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)
