---
title: "Fetch a list of accounts"
method: POST
path: "/v1-beta/accounts:search"
tags: ["Accounts"]
---

# Fetch a list of accounts

`POST /v1-beta/accounts:search`

Retrieves a list of accounts with optional filters for companyId, ids, name, code and archived status. Results are paginated.

## Query parameters

- `before` string
- `after` string
- `offset` integer
- `limit` integer
- `sorting_keys` string[]
- `sorting_order` PageOrder[]

## Response `200`

Fetch of accounts successful.

- CursorPaginatedResponseBookkeepingAccountRestModelV4
  - `data` BookkeepingAccountRestModelV4[], required
    - `archived` boolean, required — Boolean flag used to determine if the account is archived.
    - `code` string, nullable — Account code or number used in the accounting system's chart of accounts.
    - `companyId` string, uuid, required — Pleo's internal identifier of the company the account is associated with.
    - `externalId` string, required — Unique external identifier of account, assigned in the external ERP/accounting system. Can be the same as code if no other identifier is available.
    - `id` string, uuid, required — Pleo's internal identifier of the account.
    - `metadata` object, nullable — Place for API users to store flexible data.
    - `name` string, required — Name of the account.
    - `taxCodeExternalId` string, nullable — The identifier in **the target system** for the tax code the account is associated with.
  - `pagination` CursorPageInfo, required
    - `currentRequestPagination` CursorPageCurrentRequestInfo, required
      - `after` string
      - `before` string
      - `limit` integer
      - `offset` integer
      - `parameters` object, required
      - `sortingKeys` string[]
      - `sortingOrder` PageOrder[]
    - `endCursor` string
    - `hasNextPage` boolean, required
    - `hasPreviousPage` boolean, required
    - `startCursor` string
    - `total` integer

## Other responses

- `400` — Bad request (e.g. missing required fields, tax code does not exist in Pleo).

---

[API](https://skmtc.net/pleo/apis/bookkeeping-core-api.md) · [All operations](https://skmtc.net/pleo/apis/bookkeeping-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pleo/bookkeeping-core-api/versions/62d2c10ab167/schema)
