> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idem.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# List All Ledger Accounts for Your Tenant — Overview

> GET /api/v1/accounts — returns all accounts for your tenant. Requires ACCOUNTS_READ scope. Each account includes its ID, name, currency, and type.

Use this endpoint to retrieve every ledger account that belongs to your tenant. The response is a flat JSON array of account objects — each one carrying the account's unique identifier, display name, ISO 4217 currency code, double-entry accounting type, its normal balance side, and its creation timestamp. This endpoint is typically used to populate account selectors in your UI or to sync your local cache before processing transactions.

## Endpoint

```
GET /api/v1/accounts
```

## Authorization

Requires an API key with the `ACCOUNTS_READ` scope. Pass your key in the `Authorization` header using the Bearer scheme.

```
Authorization: Bearer <api-key>
```

## Parameters

This endpoint has no path, query, or body parameters.

## Request example

```bash theme={null}
curl --request GET \
  --url https://api.your-domain.com/api/v1/accounts \
  --header "Authorization: Bearer <api-key>"
```

## Response

The response body is the array itself — it is **not** wrapped in an `accounts` object.

<ResponseField name="id" type="string (UUID)" required>
  Unique identifier for the account.
</ResponseField>

<ResponseField name="name" type="string" required>
  Human-readable display name for the account.
</ResponseField>

<ResponseField name="description" type="string">
  Optional free-text description. `null` if not set.
</ResponseField>

<ResponseField name="currency" type="string" required>
  ISO 4217 currency code. One of `BRL`, `USD`, `MXN`, or `EUR`.
</ResponseField>

<ResponseField name="type" type="string" required>
  Double-entry accounting classification. One of `ASSET`, `LIABILITY`, `EQUITY`, `REVENUE`, or `EXPENSE`.
</ResponseField>

<ResponseField name="normalBalance" type="string" required>
  `DEBIT` for `ASSET`/`EXPENSE` accounts, `CREDIT` for `LIABILITY`/`EQUITY`/`REVENUE` accounts — derived from `type`, not stored separately.
</ResponseField>

<ResponseField name="createdAt" type="string (ISO 8601)" required>
  Timestamp at which the account was created.
</ResponseField>

## Response example

```json theme={null}
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Operating Cash",
    "description": "Primary USD cash account for day-to-day operations",
    "currency": "USD",
    "type": "ASSET",
    "normalBalance": "DEBIT",
    "createdAt": "2024-03-01T09:00:00Z"
  },
  {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "Accounts Payable — BRL",
    "description": null,
    "currency": "BRL",
    "type": "LIABILITY",
    "normalBalance": "CREDIT",
    "createdAt": "2024-03-05T14:22:10Z"
  }
]
```

<Note>
  The array is returned in ascending creation order. If your tenant has no accounts yet, the response is an empty array (`[]`) rather than `null`.
</Note>

## Error codes

| Code | Meaning                                                                                                         |
| ---- | --------------------------------------------------------------------------------------------------------------- |
| 401  | Missing or invalid API key. Check that your `Authorization` header is present and the key has not been revoked. |
| 403  | Your API key does not have the `ACCOUNTS_READ` scope. Re-issue the key with the required scope and retry.       |
