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

# Search Accounts

> GET /v1/accounts — Search virtual accounts with filters for account name, number, end user, or product. Returns paginated results.

Search and list virtual accounts associated with your platform. You can narrow results using exact-match filters on account name or account number, a free-text partial search across both fields, or by filtering to a specific end user or product. Results are returned in pages; use the `page` and `limit` parameters to navigate large result sets.

## Endpoint

```
GET /v1/accounts
```

**Required scope:** `com.diameterpay.api/accounts.read`

## Request Headers

**Authorization** `string` *required*

Bearer token obtained from your OAuth 2.0 token endpoint. Format: `Bearer {access_token}`

## Query Parameters

**page** `integer`

The page number to retrieve, starting from `1`. Defaults to `1`.

**limit** `integer`

The number of accounts to return per page. Defaults to `10`. Maximum is `100`.

**accountName** `string`

Exact-match filter on the account name. Returns only accounts whose `accountName` equals this value exactly.

**accountNumber** `string`

Exact-match filter on the account number. Returns only accounts whose `accountNumber` equals this value exactly.

**freeSearch** `string`

Partial-match search across both `accountName` and `accountNumber`. Useful for lookahead search UIs. Cannot be combined with `accountName` or `accountNumber` filters.

**endUserId** `string`

Filter results to accounts belonging to this end-user UUID.

**productId** `string`

Filter results to accounts associated with this product UUID.

**includeEndUserName** `boolean`

When `true`, each account object in the response includes the `endUserName` field resolved from the associated end user record. Defaults to `false`.

## Response Fields

**data** `array`

Array of account objects matching the query. Each object has the same shape as the [Get Account](https://diameterpay.mintlify.site/api-reference/accounts/get-account.md) response.

**total** `integer`

Total number of accounts matching the query across all pages.

**page** `integer`

The current page number.

**limit** `integer`

The number of results per page as requested.

## Example Request

Fetch the first page of accounts for a specific end user:

```bash theme={null}
curl --request GET \
  --url "https://api.sandbox.diameterpay.com/v1/accounts?endUserId=f47ac10b-58cc-4372-a567-0e02b2c3d479&page=1&limit=10" \
  --header "Authorization: Bearer {access_token}"
```

Free-text search across account name and number:

```bash theme={null}
curl --request GET \
  --url "https://api.sandbox.diameterpay.com/v1/accounts?freeSearch=acme&includeEndUserName=true" \
  --header "Authorization: Bearer {access_token}"
```

## Example Response

```json theme={null}
{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "accountNumber": "8675309001",
      "accountName": "Acme Operating Account",
      "currency": "USD",
      "bank": "PORTAGE",
      "endUserId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "productId": "c9d8e7f6-a5b4-3c2d-1e0f-9a8b7c6d5e4f",
      "wireInstructions": {
        "bicCode": "PRTGUS33",
        "routingNumber": "071004200"
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-06-01T08:45:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 10
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.