Skip to main content
POST
/
v1
/
ais
/
accounts
Get User Bank Accounts
curl --request POST \
  --url https://acount-apis-staging-a8cdb2402163.herokuapp.com/v1/ais/accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "user_35100188",
  "merchantId": 1
}
'
{
  "userId": "user_2abc123def456",
  "merchantId": 1,
  "clientId": "fdae2b5e-0c10-4fc5-8860-4f3e7a00b4bb",
  "consentId": "ta:EjpMqkVifCjyRJ224tB18CVvenReoiKK1YWgb8J7cK85:5zKtXEAq",
  "accounts": [
    {
      "accountId": "acc_2abc123def456",
      "bankId": "obDanske",
      "accountHolderName": "John Doe",
      "iban": "DK5000400440116243",
      "currency": "DKK",
      "balance": "1500.50",
      "accountType": "CURRENT",
      "accountDetails": {}
    }
  ],
  "totalAccounts": 2
}
Retrieves bank accounts using Token.io’s /accounts endpoint.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-request-id
string

Request ID for tracking

Body

application/json
userId
string
required
Example:

"user_35100188"

merchantId
integer
required
Example:

1

Response

Accounts retrieved successfully

userId
string
Example:

"user_2abc123def456"

merchantId
integer
Example:

1

clientId
string
Example:

"fdae2b5e-0c10-4fc5-8860-4f3e7a00b4bb"

Example:

"ta:EjpMqkVifCjyRJ224tB18CVvenReoiKK1YWgb8J7cK85:5zKtXEAq"

accounts
object[]
totalAccounts
integer
Example:

2