---
updatedAt: 2026-08-05T15:59:40.000Z
agentTools:
  projectIndex: https://docs.data.one/llms.txt
---

# Get All Accounts for User

Given a `userId` this endpoint will fetch all open banking connected and CaaS accounts for the user.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "info": {
    "version": "v1",
    "title": "Retrieving Data",
    "description": "Endpoints relating to fetching and sending data for a user for the purposes of Categorisation-as-a-Service (CaaS)."
  },
  "paths": {
    "/v2/users/{userId}/accounts": {
      "get": {
        "tags": [
          "Accounts V2"
        ],
        "operationId": "getAllConnectedUserAccountsV2",
        "summary": "Get All Accounts for User",
        "description": "Given a `userId` this endpoint will fetch all open banking connected and CaaS accounts for the user.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/UserId"
          },
          {
            "$ref": "#/components/parameters/AccountDataOrigin"
          }
        ],
        "responses": {
          "200": {
            "description": "All user accounts successfully received.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountsResponseV2"
                },
                "examples": {
                  "open-banking-account": {
                    "summary": "Open Banking Account Example",
                    "description": "An example of an account created via Open Banking",
                    "value": {
                      "accounts": [
                        {
                          "accountId": "547067f1-27b3-4146-87c8-c7ce8c36855a",
                          "providerId": "0e8e9eee-e69b-4c45-a892-c6cc4e313aad",
                          "providerName": "First Direct",
                          "userId": "08d95262-6809-d8ac-cee9-de176786e8b9",
                          "accountType": "Current Account",
                          "accountNumber": "12345678",
                          "accountName": "Mary Smith",
                          "sortCode": "404764",
                          "currency": "GBP",
                          "lastRefreshStatus": "SUCCESS",
                          "tokenCreatedDate": "2022-04-22T10:50:06.2146558Z",
                          "tokenRefreshDate": "2022-04-22T10:50:06.2146559Z",
                          "tokenExpiryDate": "2022-07-21T10:50:06.2146558Z",
                          "openingDate": "2021-01-11T15:32:11.2146558Z",
                          "lastTransactionRefresh": "2022-01-11T11:45:43.2146558Z",
                          "lastTransactionRefreshDate": "2022-01-11T11:45:42.4146558Z",
                          "balance": 1000,
                          "lastAccountRefreshDate": "2022-01-11T11:45:42.4146558Z",
                          "parties": [
                            {
                              "partyType": "Joint",
                              "name": "Johnny Smith",
                              "fullLegalName": "Mr John William Smith",
                              "address": null
                            },
                            {
                              "partyType": "Joint",
                              "name": "Mary Smith",
                              "fullLegalName": "Mrs Mary Margaret Smith",
                              "address": null
                            }
                          ],
                          "creditLine": {
                            "available": 100,
                            "credit": 1000
                          },
                          "accountVerification": {
                            "nameMatchScore": 0.8,
                            "nameMatchField": "PartiesFullLegalName",
                            "nameMatchValue": "Jane Doe",
                            "userName": "Janet Doe"
                          },
                          "correlationId": "account1234",
                          "dataOrigin": "DATA_ONE"
                        }
                      ]
                    }
                  },
                  "caas-account": {
                    "summary": "CAAS Account Example",
                    "description": "An example of an account created via CAAS",
                    "value": {
                      "accounts": [
                        {
                          "accountId": "547067f1-27b3-4146-87c8-c7ce8c36855a",
                          "providerId": "0e8e9eee-e69b-4c45-a892-c6cc4e313aad",
                          "providerName": "First Direct",
                          "userId": "08d95262-6809-d8ac-cee9-de176786e8b9",
                          "accountType": "Current Account",
                          "accountNumber": null,
                          "accountName": "account1234",
                          "sortCode": null,
                          "currency": "GBP",
                          "lastRefreshStatus": "UNKNOWN",
                          "tokenCreatedDate": null,
                          "tokenRefreshDate": null,
                          "tokenExpiryDate": null,
                          "openingDate": null,
                          "lastTransactionRefresh": null,
                          "lastTransactionRefreshDate": null,
                          "balance": null,
                          "lastAccountRefreshDate": null,
                          "parties": [],
                          "creditLine": {},
                          "accountVerification": null,
                          "correlationId": "account1234",
                          "dataOrigin": "CAAS"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ApiKeyUnauthorizedError"
          },
          "404": {
            "description": "User is invalid or does not exist."
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api-sandbox.data.one",
      "description": "Hostname for sandbox API"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Secret API key used for authentication."
      }
    },
    "schemas": {
      "AccountVerification": {
        "type": "object",
        "properties": {
          "nameMatchScore": {
            "type": "number",
            "description": "A value between 0 and 1 indicating the strength of the match between the the given user name and the name on the account. A value of 1 represents a perfect match."
          },
          "nameMatchField": {
            "type": "string",
            "enum": [
              "PartiesFullLegalName",
              "PartiesName"
            ],
            "description": "The user name is matched against the full legal name or in its absence to the name field in the parties data. This field indicates which field the user name was matched against in calculating the score."
          },
          "nameMatchValue": {
            "type": "string",
            "description": "The value of the field indicated by the nameMatchField."
          },
          "userName": {
            "type": "string",
            "description": "The user name given by the partner."
          }
        }
      },
      "CreditLine": {
        "type": "object",
        "properties": {
          "available": {
            "type": "number",
            "format": "currency",
            "description": "The amount of credit available to a user on their agreed credit line, overdraft in case of a current account or credit limit in case of a credit card. Note: not all banks return this."
          },
          "credit": {
            "type": "number",
            "format": "currency",
            "description": "The amount of credit a user has agreed with this banking provider. This could be an overdraft in the case of a current account or the credit limit in the case of a credit card. Note: not all banks return this."
          }
        },
        "example": {
          "available": 100,
          "credit": 1000
        }
      },
      "PartyResponse": {
        "type": "object",
        "properties": {
          "partyType": {
            "type": "string",
            "enum": [
              "Delegate",
              "Joint",
              "Sole"
            ],
            "description": "The type of party attached to the account."
          },
          "name": {
            "type": "string",
            "description": "Name by which a party is known and which is usually used to identify that party."
          },
          "fullLegalName": {
            "type": "string",
            "description": "The full legal name of the party."
          },
          "address": {
            "type": "string",
            "description": "At time of writing, no bank returns this data."
          }
        },
        "example": {
          "partyType": "Sole",
          "name": "Mary Smith",
          "fullLegalName": "Mrs Mary Margaret Smith",
          "address": null
        }
      },
      "AccountResponseV2": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier for the account."
          },
          "providerId": {
            "type": "string",
            "format": "uuid",
            "description": "The GUID of the Financial Institution this account belongs to."
          },
          "providerName": {
            "type": "string",
            "description": "The Name of the Financial Institution this account belongs to."
          },
          "userId": {
            "type": "string",
            "format": "uuid",
            "description": "The GUID of the user this account belongs to."
          },
          "accountType": {
            "type": "string",
            "enum": [
              "EMoney",
              "Mortgage",
              "Joint Account",
              "Savings Goal",
              "Investment Account",
              "Credit Card",
              "Crypto Account",
              "Pension",
              "Current Account",
              "Loan",
              "Charge Card",
              "Savings Account",
              "PrePaid Card"
            ],
            "description": "The type of account returned\n\nCan be null value if an account type hasn't been seen before."
          },
          "accountNumber": {
            "type": "string",
            "description": "The account number for the account, or the PAN number if it is a credit card.\n\nDepending on the Financial Institution this could be masked, especially if it it s a PAN. I.e.\n\nXXXX-XXXX-XXXX-X123\n\nbut also if it is a current account Id:\nXXXX1234"
          },
          "accountName": {
            "type": "string",
            "description": "The name this Financial Institution has stored for the account.\n\nNote: the value defaults to 'British Pound Account' if it's missing from the account details returned by the bank."
          },
          "sortCode": {
            "type": "string",
            "description": "The sort code for the account if the account is a current account."
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code representing the base currency of the account."
          },
          "lastRefreshStatus": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "TOKEN_REFRESH_FAILURE",
              "ACCOUNT_REFRESH_ERROR",
              "TRANSACTION_FETCH_ERROR",
              "MISSING_ACCOUNT",
              "UNKNOWN"
            ],
            "description": "An string representing the outcome of the last account refresh attempt."
          },
          "tokenCreatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "The DateTime when the OAuth token linked to the account was created."
          },
          "tokenRefreshDate": {
            "type": "string",
            "format": "date-time",
            "description": "The DateTime when the OAuth token linked to the account was last refreshed."
          },
          "tokenExpiryDate": {
            "type": "string",
            "format": "date-time",
            "description": "The DateTime when the OAuth token linked to the account will expire."
          },
          "openingDate": {
            "type": "string",
            "format": "date-time",
            "description": "The DateTime when the account was opened at the Financial Institution.\n\nThis is likely to be sparsely populated."
          },
          "lastTransactionRefresh": {
            "type": "string",
            "format": "date-time",
            "description": "The DateTime when the transactions were last refreshed.",
            "deprecated": true
          },
          "lastTransactionRefreshDate": {
            "type": "string",
            "format": "date-time",
            "description": "The DateTime when the transactions were last refreshed."
          },
          "balance": {
            "type": "number",
            "description": "The balance in the account at the time of the last refresh as specified in `lastAccountRefreshDate` field."
          },
          "lastAccountRefreshDate": {
            "type": "string",
            "format": "date-time",
            "description": "The DateTime when the account was last refreshed."
          },
          "parties": {
            "type": "array",
            "description": "An array of details of the account owner(s)/holder(s) for the account.\n\nNote: only some banks return this data, null will be returned if the bank does not support returning parties data.\n\nNote: At time of writing, no banks return an address",
            "items": {
              "$ref": "#/components/schemas/PartyResponse"
            }
          },
          "creditLine": {
            "$ref": "#/components/schemas/CreditLine"
          },
          "accountVerification": {
            "$ref": "#/components/schemas/AccountVerification"
          },
          "correlationId": {
            "type": "string",
            "description": "The `correlationId` is a field which allows the client to place a custom identifier for the account."
          },
          "dataOrigin": {
            "type": "string",
            "description": "An optional string enum which is used to represent the origin of account and transactions data. If not provided, the default value DATA_ONE is used. DATA_ONE dataOrigin users have stored account and transaction data which the DataOne system retrieves via open banking connections from ASPSPs. CAAS dataOrigin users have stored account and transaction data which is directly sent to the DataOne system via API by DataOne partners.",
            "enum": [
              "DATA_ONE",
              "CAAS"
            ]
          }
        },
        "required": [
          "accountId",
          "providerId",
          "providerName",
          "userId",
          "accountName",
          "lastRefreshStatus",
          "currency",
          "creditLine"
        ]
      },
      "AccountsResponseV2": {
        "type": "object",
        "properties": {
          "accounts": {
            "type": "array",
            "description": "List of user's accounts.",
            "items": {
              "$ref": "#/components/schemas/AccountResponseV2"
            }
          }
        },
        "required": [
          "accounts"
        ],
        "example": {
          "accounts": [
            {
              "accountId": "547067f1-27b3-4146-87c8-c7ce8c36855a",
              "providerId": "0e8e9eee-e69b-4c45-a892-c6cc4e313aad",
              "providerName": "First Direct",
              "userId": "08d95262-6809-d8ac-cee9-de176786e8b9",
              "accountType": "Current Account",
              "accountNumber": "12345678",
              "accountName": "Mary Smith",
              "sortCode": "404764",
              "currency": "GBP",
              "lastRefreshStatus": "SUCCESS",
              "tokenCreatedDate": "2022-04-22T10:50:06.2146558Z",
              "tokenRefreshDate": "2022-04-22T10:50:06.2146559Z",
              "tokenExpiryDate": "2022-07-21T10:50:06.2146558Z",
              "openingDate": "2021-01-11T15:32:11.2146558Z",
              "lastTransactionRefresh": "2022-01-11T11:45:43.2146558Z",
              "lastTransactionRefreshDate": "2022-01-11T11:45:42.4146558Z",
              "balance": 1000,
              "lastAccountRefreshDate": "2022-01-11T11:45:42.4146558Z",
              "parties": [
                {
                  "partyType": "Joint",
                  "name": "Johnny Smith",
                  "fullLegalName": "Mr John William Smith",
                  "address": null
                },
                {
                  "partyType": "Joint",
                  "name": "Mary Smith",
                  "fullLegalName": "Mrs Mary Margaret Smith",
                  "address": null
                }
              ],
              "creditLine": {
                "available": 100,
                "credit": 1000
              },
              "accountVerification": {
                "nameMatchScore": 0.8,
                "nameMatchField": "PartiesFullLegalName",
                "nameMatchValue": "Jane Doe",
                "userName": "Janet Doe"
              },
              "accountOwnerType": "PERSONAL",
              "correlationId": "account1234",
              "dataOrigin": "DATA_ONE"
            }
          ]
        }
      }
    },
    "responses": {
      "ApiKeyUnauthorizedError": {
        "description": "API key authentication unsuccessful."
      }
    },
    "parameters": {
      "UserId": {
        "in": "path",
        "name": "userId",
        "description": "The User ID",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "required": true,
        "example": "2590eaff-94dc-43f4-be30-bdab6c2cec8b"
      },
      "AccountDataOrigin": {
        "in": "query",
        "name": "dataOrigin",
        "description": "An optional string enum which is used to represent the origin of account and transactions data. If not provided, all accounts are retrieved. DATA_ONE dataOrigin accounts have stored account and transaction data which the DataOne system retrieves via open banking connections from ASPSPs. CAAS dataOrigin accounts have stored account and transaction data which is directly sent to the DataOne system via API by DataOne partners.",
        "schema": {
          "type": "string",
          "enum": [
            "DATA_ONE",
            "CAAS"
          ]
        }
      }
    }
  }
}
```