> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.monite.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server.

# Get ledger accounts

GET https://api.sandbox.monite.com/v1/ledger_accounts

Get all ledger accounts

Reference: https://docs.monite.com/api/ledger-accounts/get-ledger-accounts

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Query parameters

- `order` (enum, optional) — Sort order (ascending by default). Typically used together with the `sort` parameter.
  - Allowed values: `asc`, `desc`
- `limit` (integer, optional, default: 250) — The number of items (0 .. 250) to return in a single page of the response. Default is 100. The response may contain fewer items if it is the last or only page. When using pagination with a non-default `limit`, you must provide the `limit` value alongside `pagination_token` in all subsequent pagination requests. Unlike other query parameters, `limit` is not inferred from `pagination_token`.
- `pagination_token` (string, optional) — A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters except `limit` are ignored and inferred from the initial query. If not specified, the first page of results will be returned.
- `sort` ("name", optional) — The field to sort the results by. Typically used together with the `order` parameter.
- `is_external` (boolean, optional) — Filter by external/internal ledger accounts

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource.

## Response

### 200

Successful Response

- `data` (list of LedgerAccountResponse, required)
- `next_pagination_token` (string, optional)
- `prev_pagination_token` (string, optional)

## Errors

### 400 Get Ledger Accounts Request Bad Request Error

Bad Request

- `error` (ErrorSchema, required)

### 401 Get Ledger Accounts Request Unauthorized Error

Unauthorized

- `error` (ErrorSchema, required)

### 403 Get Ledger Accounts Request Forbidden Error

Forbidden

- `error` (ErrorSchema, required)

### 422 Get Ledger Accounts Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Get Ledger Accounts Request Internal Server Error

Internal Server Error

- `error` (ErrorSchema, required)

## Types

### LedgerAccountResponse

Represents a general ledger account retrieved from an accounting system.

- `id` (string, required) — A unique identifier of the ledger account.
- `created_at` (datetime, required) — The timestamp when the ledger account was created.
- `updated_at` (datetime, required) — The timestamp when the ledger account was last updated.
- `is_bank_account` (boolean, required) — Indicates whether this ledger account represents a bank account.
- `status` (string, required) — The status of the ledger account. Possible values: Active, Archived, Pending, Unknown.
- `type` (string, required) — The type of the ledger account. It determines whether the account is a credit account or a debit account and where it appears in financial reports within the accounting system. Possible values: Asset, Equity, Expense, Income, Liability, Unknown.
- `currency` (enum, optional) — The currency of the ledger account, specified as a three-letter [currency code](https://docs.monite.com/references/currencies) (ISO 4217).
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
- `current_balance` (integer, optional) — The current balance in the account.
- `description` (string, optional) — User-defined description of the ledger account.
- `is_external` (boolean, optional, default: false) — Whether the ledger account is from an external system
- `name` (string, optional) — A user-defined name of the ledger account. Examples: Accounts Receivable, Office Equipment, Advertising, Salaries.
- `nominal_code` (string, optional) — The account code in the accounting system.
- `subtype` (string, optional) — The subtype or category of the ledger account. Possible values vary based on the accounting system used. Examples: Current, Fixed, Expense, Inventory, Equity.

### ErrorSchema

- `message` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItem

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "id",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "is_bank_account": true,
      "status": "Active",
      "type": "Asset",
      "currency": "AED",
      "current_balance": 1,
      "description": "description",
      "is_external": true,
      "name": "Accounts Receivable",
      "nominal_code": "610",
      "subtype": "Current"
    }
  ],
  "next_pagination_token": "next_pagination_token",
  "prev_pagination_token": "prev_pagination_token"
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/ledger_accounts"

headers = {
    "x-monite-version": "2024-01-31",
    "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/ledger_accounts';
const options = {
  method: 'GET',
  headers: {
    'x-monite-version': '2024-01-31',
    'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    Authorization: 'Bearer <token>'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.monite.com/v1/ledger_accounts"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-monite-version", "2024-01-31")
	req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.monite.com/v1/ledger_accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-monite-version"] = '2024-01-31'
request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.sandbox.monite.com/v1/ledger_accounts")
  .header("x-monite-version", "2024-01-31")
  .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sandbox.monite.com/v1/ledger_accounts', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    'x-monite-version' => '2024-01-31',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/ledger_accounts");
var request = new RestRequest(Method.GET);
request.AddHeader("x-monite-version", "2024-01-31");
request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2024-01-31",
  "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/ledger_accounts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```