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

# Create CaaS Account for User

Given a `userId` this endpoint will create a CaaS account for the user. The response includes `providerId` and a populated `providerName` when a provider is resolved.

# 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": {
    "/v1/users/{userId}/accounts": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "operationId": "createCaaSAccountForUser",
        "summary": "Create CaaS Account for User",
        "description": "Given a `userId` this endpoint will create a CaaS account for the user. The response includes `providerId` and a populated `providerName` when a provider is resolved.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/UserId"
          }
        ],
        "requestBody": {
          "description": "The CaaS account to be created.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaaSAccountRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The successfully created CaaS account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponseV2"
                },
                "example": {
                  "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": "Jane Doe",
                  "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"
                }
              }
            }
          },
          "400": {
            "description": "Account data validation failed, or the supplied `providerName` is not a supported provider."
          },
          "401": {
            "$ref": "#/components/responses/ApiKeyUnauthorizedError"
          },
          "403": {
            "description": "CaaS is forbidden for the requesting partner."
          },
          "404": {
            "description": "User is invalid or does not exist."
          },
          "500": {
            "description": "Default provider not found."
          }
        }
      }
    }
  },
  "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"
        ]
      },
      "CaaSAccountRequest": {
        "type": "object",
        "properties": {
          "accountCorrelationId": {
            "type": "string",
            "maxLength": 256,
            "description": "An optional identifying value for an account. This must be 256 characters or less."
          },
          "providerName": {
            "type": "string",
            "description": "The optional name of the financial institution this account belongs to. A full list of supported providers can be found via the providers endpoint. Omit or blank values will use default categorisation."
          },
          "accountType": {
            "$ref": "#/components/schemas/CaaSAccountType"
          }
        },
        "required": [
          "accountType"
        ],
        "example": {
          "accountCorrelationId": "882c9be9-88ea-49d4-8248-724ec9d9ed70",
          "providerName": "First Direct",
          "accountType": "CurrentAccount"
        }
      },
      "CaaSAccountType": {
        "type": "string",
        "enum": [
          "EMoney",
          "Mortgage",
          "JointAccount",
          "SavingsGoal",
          "InvestmentAccount",
          "CreditCard",
          "CryptoAccount",
          "Pension",
          "CurrentAccount",
          "Loan",
          "ChargeCard",
          "SavingsAccount",
          "PrePaidCard"
        ],
        "description": "The account type for CaaS account creation."
      }
    },
    "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"
      }
    }
  }
}
```