# List bank accounts

Endpoint: GET /p2p/bank-account
Security: ClientKey, SecretKey

## Security:

  - `ClientKey` (unknown)
    apiKey in header X-Dime-Client

  - `SecretKey` (unknown)
    http bearer

## Query parameters:

  - `page` (integer)

  - `page_size` (integer)

  - `search` (string)
    Name, email or account number. Quotes and backslashes are rejected.

  - `sort` (string)

  - `sort_type` (string)

## Response 200:

  - `200` (unknown)
    A page of bank accounts, offset-paginated.

## Response 200 fields (application/json):

  - `object` (string)
    Enum: "list"

  - `total_count` (integer)

  - `data` (array)

  - `data.object` (string)
    Enum: "bank_account"

  - `data.token` (string)
    Example: bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI

  - `data.recipient_bank_details` (object | null)

  - `data.last_activity_at` (string | null)

  - `data.created_at` (string)

  - `data.updated_at` (string)

## Response 400:

  - `400` (unknown)
    The request was rejected.

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.type` (string, required)
    Which kind of failure occurred. Always one of four values, so
a client can branch on `type` before reading `code`.
    Enum: "invalid_request_error", "card_error", "idempotency_error", "api_error"

  - `error.code` (string, required)
    Example: parameter_missing

  - `error.message` (string, required)
    Example: Order ID is required.

  - `error.param` (string)
    The field that caused the failure, when applicable.
    Example: id

## Response 401:

  - `401` (unknown)
    The client key or secret key was missing, not recognized, or the two do not belong to the same key.

## Response 401 fields (application/json):

  - `error` (object, required)

  - `error.type` (string, required)
    Which kind of failure occurred. Always one of four values, so
a client can branch on `type` before reading `code`.
    Enum: "invalid_request_error", "card_error", "idempotency_error", "api_error"

  - `error.code` (string, required)
    Example: parameter_missing

  - `error.message` (string, required)
    Example: Order ID is required.

  - `error.param` (string)
    The field that caused the failure, when applicable.
    Example: id

## Response 404:

  - `404` (unknown)
    No record matches the token in the request. A database id in a URL
also ends here: v2 looks records up by token only.

## Response 404 fields (application/json):

  - `error` (object, required)

  - `error.type` (string, required)
    Which kind of failure occurred. Always one of four values, so
a client can branch on `type` before reading `code`.
    Enum: "invalid_request_error", "card_error", "idempotency_error", "api_error"

  - `error.code` (string, required)
    Example: parameter_missing

  - `error.message` (string, required)
    Example: Order ID is required.

  - `error.param` (string)
    The field that caused the failure, when applicable.
    Example: id

## Response 400 examples:

  - `A required field was absent` (unknown)

## Response 401 examples:

  - `unauthorized` (unknown)

  - `Client key sent without its secret key` (unknown)

## Response 404 examples:

  - `missing` (unknown)

