# Upsert Accounts `UpsertAccounts` `POST /api/chartofaccounts/{scope}/{code}/accounts` - [OpenAPI fragment](https://www.lusid.com/docs/api/lusid/endpoints/chart-of-accounts/UpsertAccounts.json) - [Rendered page](https://www.lusid.com/docs/api/lusid/endpoints/chart-of-accounts/UpsertAccounts) Create or update accounts in the Chart of Accounts. An account will be updated if it already exists and created if it does not. The maximum number of accounts that this method can upsert per request is 2,000. ## Referenced schemas - [Account](https://www.lusid.com/docs/api/lusid/schemas/Account.txt) - [AccountsUpsertResponse](https://www.lusid.com/docs/api/lusid/schemas/AccountsUpsertResponse.txt) [< Chart Of Accounts](https://www.lusid.com/docs/api/lusid/endpoints/chart-of-accounts/llms.txt)