Can I create trading accounts through the API?
Quick answer
Yes. `POST /v1/accounts` creates up to 5,000 accounts against an account type in one request, using one credit each, with the `accounts:write` scope. Send an Idempotency-Key header so a retried request returns the same accounts instead of charging twice. Many firms still pre-create inventory and assign it, which makes delivery instant.
Detailed answer
Two patterns work, and many firms use both.
Create on demand
Call POST /v1/accounts with the account type and a quantity when a sale arrives. Send an Idempotency-Key (for example the order id): a retry with the same key returns the same accounts and charges nothing more. If the key also has credentials:read, each new account comes back with its password, ready to email.
Pre-created inventory
- Create accounts in bulk, in the admin panel or over the API, for each size you sell.
- Keep track of unassigned account numbers.
- Assign them to buyers with
PUT /v1/accounts/{number}/trader.
Why inventory works
- Delivery is instant: the account already exists when the sale arrives.
- Credits are used at creation, which you control.
- Rule versions are fixed at creation, so inventory accounts behave predictably.
Managing inventory
- Watch the count of unassigned accounts per size.
- Top up before promotions.
- If you change a rule set, decide whether to use up old inventory or create new accounts on the new version.
PropExecutor team · Updated