> For the complete documentation index, see [llms.txt](https://docs.ospree.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ospree.io/developers/accounts-directory/list-accounts.md).

# List Accounts

<mark style="color:green;">`GET`</mark> `/api/v2/directory/accounts`

This endpoint retrieves a list of all accounts within the directory.

**Query Parameters**

<table><thead><tr><th width="228">Name</th><th width="102">Type</th><th width="335">Description</th><th>Required</th></tr></thead><tbody><tr><td><code>start_range</code></td><td>string</td><td>Starting point for specified data range. Example:<mark style="color:orange;"><code>2020-12-09</code></mark></td><td></td></tr><tr><td><code>end_range</code></td><td>string</td><td>Ending point for specified data range.  Example:<mark style="color:orange;"><code>2023-12-09</code></mark></td><td></td></tr><tr><td><code>page</code></td><td>integer</td><td>The page number. Minimum: <mark style="color:orange;"><code>1</code></mark>. Default: <mark style="color:orange;"><code>1</code></mark> </td><td></td></tr><tr><td><code>size</code></td><td>Integer</td><td>The page size. Minimum: <mark style="color:orange;"><code>1</code></mark>. Maximum: <mark style="color:orange;"><code>100</code></mark>. Default: <mark style="color:orange;"><code>50</code></mark>.</td><td></td></tr><tr><td><code>sort</code></td><td>string</td><td><p>Criteria for result sorting. </p><p>Default: <mark style="color:orange;"><code>-created</code></mark>. Example: </p><p><mark style="color:orange;"><code>-last_modified</code></mark></p></td><td></td></tr><tr><td><code>account_type</code></td><td>string</td><td>Type of the account. Either <mark style="color:orange;"><code>individual</code></mark> or <mark style="color:orange;"><code>entity</code></mark></td><td></td></tr><tr><td><code>account_category</code></td><td>string</td><td>Category of the account. Either <mark style="color:orange;"><code>customer</code></mark> or <mark style="color:orange;"><code>recipient</code></mark>. </td><td></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "success",
    "data": {
        "items": [
            {
                "reference_id": "Mary",
                "account_type": "Individual",
                "name": "Mary Jane",
                "account_category": "customer",
                "email": "mary@example.com",
                "created": "2024-09-20T07:16:05+00:00",
                "last_modified": "2024-09-20T07:16:05+00:00"
            },
            {
                "reference_id": "Ospree",
                "account_type": "Entity",
                "name": "Ospree Ltd.",
                "account_category": "customer",
                "email": "ospree@example.com",
                "created": "2024-09-18T09:52:51+00:00",
                "last_modified": "2024-09-18T09:52:51+00:00"
            },
            {
                "reference_id": "John123",
                "account_type": "Individual",
                "name": "John Doe",
                "account_category": "recipient",
                "email": "john@example.com",
                "created": "2024-09-18T09:52:36+00:00",
                "last_modified": "2024-09-18T09:52:36+00:00"
            },
            {
                "reference_id": "NewBusiness123",
                "account_type": "Entity",
                "name": "New Business Ltd.",
                "account_category": "recipient",
                "email": "newbusiness@example.com",
                "created": "2024-09-18T09:52:14+00:00",
                "last_modified": "2024-09-18T09:52:14+00:00"
            }
        ],
        "pagination": {
            "total": 4,
            "size": 10,
            "page": 1
        }
    }
}
```

{% endtab %}
{% endtabs %}
