`POST /v1/accounts`
POST/v1/accounts
Create account.
create account (v1 legacy). .5: holder callers can only create accounts owned by themselves. Server-side defence-in-depth:
- If the caller is a holder (§4.3c - no
holder:view-allscope) and they did not supplycustomer_id, we resolve it from their Auth user id (viacustomers). - If the caller is a holder and they did supply a
customer_idthat does not match their own, we return 403 (they cannot create accounts for someone else). - If no
customersrow exists for the holder, we return 403 - there is no way to own the account, so creating it would leave an orphan (the list/get handlers then hide it forever).
- Callers with
holder:view-all(staff / sys / M2M) are unrestricted: they can pass anycustomer_idor none (for internal accounts).
Request
Responses
- 200
- 400
- 403
Account created
Invalid account type or module validation failed
Missing bank8:ledger:accounts:write scope