Appearance
Create a sub-account​
POST
/v1/account/subaccount
Requires SUB_ACCOUNTS_MANAGE, granted by TREASURY_WRITE (bundles)
Creates a sub-account and returns its ID. Set accountTags to ["CLIENT_FUNDS"] to mark it as an account for your clients' funds. Call it on your primary account (don't send X-VALR-SUB-ACCOUNT-ID); keys limited to some sub-accounts can't use it.
Parameters​
Query Parameters
isProprietarySubAccount
Only matters if VALR has made KYC details mandatory for your sub-accounts: then true creates a sub-account with just a name, and with false the body must also include the account holder's KYC details.
Type
boolean
Example
trueDefault
falseRequest Body​
application/json
JSON
{
"label": "Client Funds",
"accountTags": [
"CLIENT_FUNDS"
]
}
Responses​
Created. The body holds the new sub-account's ID as a string in id.
application/json
Samples​
Errors
| HTTP | Error | When |
|---|---|---|
| 400 | -113INVALID_JSON | The body isn't valid JSON. |
| 400 | -11INVALID_REQUEST | The body is empty or a field fails validation (validationErrors lists each failing field), or isProprietarySubAccount isn't true or false. |
| 400 | -17214INVALID_ACCOUNT_TAG_COMBINATION | accountTags contains a tag other than CLIENT_FUNDS. |
| 403 | -11132SUB_ACCOUNT_ALREADY_EXISTS | Another of your sub-accounts already has this name (ignoring case), or the name is Primary or Main. |
| 403 | -11136SUB_ACCOUNT_LIMIT_EXCEEDED | Your business already has the maximum number of sub-accounts. |
| 409 | -11423SUB_ACCOUNT_PROFILE_INFO_ALREADY_EXISTS | Only when KYC details are mandatory for your sub-accounts: another of your sub-accounts already has this email address, ID number or cell number. |
Plus the errors common to all signed endpoints.