---
title: "Create Ledger Accounts in batch"
method: POST
path: "/accounting/ledger-accounts/batch"
tags: ["Ledger Accounts"]
---

# Create Ledger Accounts in batch

`POST /accounting/ledger-accounts/batch`

## Request

- Base URL: `https://unify.apideck.com`
- URL: `https://unify.apideck.com/accounting/ledger-accounts/batch`
- Auth: API key in header `Authorization`

Create multiple ledger accounts in a single request. Each item is processed independently, so some may be created while others fail; the response returns `200` with one result per item, in the order the items were sent. The maximum number of items accepted per request depends on the connector.

## Query parameters

- `raw` boolean

## Headers

- `x-apideck-consumer-id` string, required
- `x-apideck-app-id` string, required
- `x-apideck-service-id` string
- `x-apideck-company-id` string

## Request body

- BatchLedgerAccountsRequest: A batch of ledger accounts to write in a single request. Each item is processed independently: some may succeed while others fail, and the response carries one result per item in the order they were sent.
  - `items` object[], required: The records to write. The per-connector limit is the real cap and is usually lower than the ceiling here: read `batch_support.resources[<resource>].max_items` on the Connector API for the connector you are calling, or the resource gotchas. This ceiling exists so an oversized array is rejected by request validation before any per-item work runs, rather than after it.
    - `_ref` string: A caller-supplied reference for this item, echoed back on the matching result so each outcome can be tied to the record it came from. Must be unique within the request. Never sent to the connector.
    - `data` LedgerAccountCreateInput, required: The writable shape of LedgerAccount for a batch create. Identical to [LedgerAccount](the model returned on reads) with the read-only properties removed — the same properties the single-record create endpoint rejects, so a batched record and a single-record create accept exactly the same body.
      - `display_id` string: The human readable display ID used when displaying the account
      - `nominal_code` string, nullable: The nominal code of the ledger account.
      - `code` string, nullable: The code assigned to the account.
      - `classification` 'asset' | 'equity' | 'expense' | 'liability' | 'revenue' | 'income' | 'other_income' | 'other_expense' | 'costs_of_sales' | 'other', nullable: The classification of account.
      - `type` 'accounts_payable' | 'accounts_receivable' | 'balancesheet' | 'bank' | 'costs_of_sales' | 'credit_card' | 'current_asset' | 'current_liability' | 'equity' | 'expense' | 'fixed_asset' | 'non_current_asset' | 'non_current_liability' | 'other_asset' | 'other_expense' | 'other_income' | 'other_liability' | 'revenue' | 'sales' | 'other': The type of account.
      - `sub_type` string, nullable: The sub type of account.
      - `name` string, nullable: The name of the account.
      - `fully_qualified_name` string, nullable: The fully qualified name of the account.
      - `description` string, nullable: The description of the account.
      - `opening_balance` number, nullable: The opening balance of the account.
      - `current_balance` number, nullable: The current balance of the account.
      - `currency` 'UNKNOWN_CURRENCY' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRC' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XTS' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'BTC' | 'ETH', nullable: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
      - `tax_type` string, nullable: The tax type of the account.
      - `tax_rate` LinkedTaxRate
        - `id` string, nullable: The ID of the object.
        - `code` string, nullable: Tax rate code
        - `name` string, nullable: Name of the tax rate
        - `rate` number, nullable: Rate of the tax rate
      - `level` number, nullable
      - `active` boolean, nullable: Whether the account is active or not.
      - `status` 'active' | 'inactive' | 'archived', nullable: The status of the account.
      - `header` boolean, nullable: Whether the account is a header or not.
      - `bank_account` BankAccount
        - `bank_name` string, nullable: The name of the bank or financial institution
        - `account_number` string, nullable: The bank account number
        - `account_name` string, nullable: The name of the bank account
        - `account_type` 'bank_account' | 'credit_card' | 'other', nullable: The type of bank account.
        - `iban` string, nullable: International Bank Account Number
        - `bic` string, nullable: Bank Identifier Code / SWIFT Code
        - `routing_number` string, nullable: Bank routing number (US)
        - `bsb_number` string, nullable: Bank State Branch number (Australia/New Zealand)
        - `branch_identifier` string, nullable: Bank branch identifier
        - `bank_code` string, nullable: Bank code assigned by central bank
        - `currency` 'UNKNOWN_CURRENCY' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRC' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XTS' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'BTC' | 'ETH', nullable: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
        - `country` string, nullable: Country code according to ISO 3166-1 alpha-2.
      - `parent_account` object
        - `id` string: The ID of the parent account.
        - `name` string: The name of the parent account.
        - `display_id` string: The human readable display ID used when displaying the parent account
      - `sub_account` boolean, nullable: Whether the account is a sub account or not.
      - `last_reconciliation_date` string, date, nullable: Reconciliation Date means the last calendar day of each Reconciliation Period.
      - `subsidiaries` object[]: The subsidiaries the account belongs to.
        - `id` string: The ID of the subsidiary.
      - `custom_fields` CustomField[]
        - union
          - object
            - `id` string, nullable, required: Unique identifier for the custom field.
            - `name` string, nullable: Name of the custom field.
            - `ref_name` string, nullable: Display name of the record a reference-type custom field points at. `value` carries that record's id; this carries its human-readable name, so a consumer does not need a second lookup to render it.
            - `description` string, nullable: More information about the custom field
            - `value` union
              - …
          - object
            - `id` string, nullable: Unique identifier for the custom field.
            - `name` string, nullable, required: Name of the custom field.
            - `ref_name` string, nullable: Display name of the record a reference-type custom field points at. `value` carries that record's id; this carries its human-readable name, so a consumer does not need a second lookup to render it.
            - `description` string, nullable: More information about the custom field
            - `value` union
              - …
      - `row_version` string, nullable: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
      - `pass_through` object[]: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
        - `service_id` string, required: Identifier for the service to which this pass_through should be applied.
        - `operation_id` string: Optional identifier for a workflow operation to which this pass_through should be applied. This is useful for Unify calls that are making more than one downstream request.
        - `extend_object` object: Simple object allowing any properties for direct extension.
        - `extend_paths` object[]: Array of objects for structured data modifications via paths.
          - `path` string, required: JSONPath string specifying where to apply the value.
          - `value` unknown, required

## Response `200`

Ledger Accounts batch processed

- BatchLedgerAccountsResponse
  - `status_code` integer, required: HTTP Response Status Code
  - `status` string, required: HTTP Response Status
  - `service` string, required: Apideck ID of service provider
  - `resource` string, required: Unified API resource name
  - `operation` string, required: Operation performed
  - `data` BatchItemResult[], required: One result per item in the request, in the order the items were sent.
    - `_ref` string: A caller-supplied reference for this item, echoed back on the matching result so each outcome can be tied to the record it came from. Must be unique within the request. Never sent to the connector.
    - `id` string: A unique identifier for an object.
    - `downstream_id` string, nullable: The third-party API ID of original entity
    - `status` 'created' | 'updated' | 'failed' | 'uncertain', required: The outcome for this item. - `created` / `updated` — the record was written. - `failed` — it was not written, and `error` says why. - `uncertain` — the request to the connector did not complete (typically a timeout), so whether this record was written is genuinely unknown. Do not blindly retry: list the resource to find what exists first, or a retry may duplicate it. A `created` or `updated` result can also carry an `error`: the record was written, but work that runs after the write did not complete. Read this rather than `id` to decide what happened. `id` is present when the identifier could also be read back, which is not the same question — a written record whose id could not be parsed still reports `created`.
    - `error` object: Why this item did not complete. Present when `status` is `failed`, meaning the record was not written, and when `status` is `uncertain`, meaning it is unknown whether it was. Also present, more rarely, alongside `created`/`updated`: the record WAS written and post-write processing failed, so the item reports the error beside its success status. Per-item failures are independent — one item's rejection says nothing about the others. The exception is a failure of the request itself, such as a timeout: where a connector writes the whole batch in one call, every item shares that outcome and carries the same error.
      - `status_code` number: HTTP status code
      - `error` string: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
      - `type_name` string: The type of error returned
      - `message` string: A human-readable message providing more details about the error.
      - `detail` union: Contains parameter or domain specific information related to the error and why it occurred.
        - string
        - object
      - `ref` string: Link to documentation of error type
    - `warnings` object[]: Non-fatal problems with THIS item — a currency the connector could not match, for example, which is sent without it. Present per item rather than per request, because a caller with twenty records needs to know which one was affected. A warning does not imply the record was written: some are raised while preparing the item, before the write is attempted, so they can appear on a `failed` item too. Read `status` for what happened.
      - `type` string
      - `operation` string
      - `message` string
      - `status_code` number
      - `error` string
  - `_raw` Raw, nullable: Raw response from the integration when raw=true query param is provided

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `402`: Payment Required
- `404`: The specified resource was not found
- `422`: Unprocessable
- `default`: Unexpected error

## Changes

- **2026-10-01** `4d9d527eb7ce`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apideck-libraries/apis/accounting-api/changes/accounting/ledger-accounts/batch/post.md)

---

[API](https://skmtc.dev/apideck-libraries/apis/accounting-api.md) · [All operations](https://skmtc.dev/apideck-libraries/apis/accounting-api/llms.txt) · [OpenAPI document](https://skmtc.dev/apideck-libraries/apis/accounting-api/revisions/d02fc67b26ca?raw)
