Create Account
POST/api/accounts
Create an account.
Request
- application/json
Body
required
- Create non-custodial cardholder account
- Create custodial cardholder account
- Create partner account
oneOf
Possible values: [cardholder
]
The type of the account
Account name
The id of the partner account that this cardholder must be linked to
This user will be set as the owner of the created account
Possible values: [cardholder
]
The type of the account
Account name
The id of the partner account that this cardholder must be made child of
Possible values: [partner
]
The type of the account
Account name
Parent account. If provided, this account will be set as the parent of the created account
Owner user id. If provided, this user will be set as the owner of the created account
Responses
- 200
- 400
- 403
Account created successfully
- application/json
- Schema
- Example (from schema)
Schema
The unique account ID
Timestamp of account creation
Timestamp of last account modification
The partner account ID that this account belongs to
Whether the account is active or not
Possible values: [cardholder
, identity
, partner
]
The account type
{
"id": "e4b66d1ddecbf518f5f337n5e5a4f682",
"createdAt": "2022-11-16T03:13:18.142Z",
"modifiedAt": "2022-11-18T03:13:18.142Z",
"partnerAccountId": "c7d84a7bf1c34323732d21bc60d17s746",
"isActive": true,
"type": "cardholder"
}
Request fields are invalid
- application/json
- Schema
- Example (from schema)
Schema
{
"statusCode": 400,
"statusName": "Bad Request",
"errorCode": "BAD_REQUEST",
"errors": [
"Expected string, received number"
]
}
User is not allowed to perform the action with the reason stated in the errorCode
FORBIDDEN Insufficient permissions to perform the action.
INVALID_PARTNER_ACCOUNT The provided partner account is not of type partner.
INVALID_PARENT_ACCOUNT The provided parent account is not of type partner.
- application/json
- Schema
- Example (from schema)
Schema
{
"statusCode": 403,
"statusName": "Forbidden",
"errorCode": "FORBIDDEN",
"reason": "Unauthorized"
}