Skip to main content
POST
Bulk-create unlinked accounts with import keys

Authorizations

X-API-Key
string
header
required

Organization API key (hp_live_...), sent in the X-API-Key header. Create, rotate and restrict keys in the dashboard or with the API keys endpoints; an organization can have two active keys, so you can rotate without downtime. A full-access key can call every endpoint in this reference. A read-only key can call GET endpoints (and create a trading stream token); any other request returns 403 READ_ONLY_KEY. A key with an IP allowlist returns 403 IP_NOT_ALLOWED from any other address. Each endpoint lists which keys can call it under Access.

Headers

Idempotency-Key
string

Optional. A value that identifies this operation on your side, at most 255 characters. A retry with the same key, method, path and body within 24 hours returns the original response (with Idempotency-Replayed: true) instead of repeating the change. The same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED; a retry while the first request is still running returns 409 IDEMPOTENCY_KEY_IN_PROGRESS. A response that contains a credential (such as a new API key or signing secret) is not saved: the change is still not repeated, and a retry returns 409 IDEMPOTENCY_KEY_COMPLETED with the original status in originalStatus. Server errors (5xx) are not saved, so a retry runs again. If the key cannot be recorded, the request is not run and returns 503 IDEMPOTENCY_UNAVAILABLE; retry with the same key.

Maximum string length: 255

Body

application/json
count
integer
required

How many unlinked accounts to create (1-100 per call)

Required range: 1 <= x <= 100
Example:

25

type
enum<string>
required

Account type for every account in the batch

Available options:
evaluation,
sim_funded,
competition
Example:

"evaluation"

tradingPlanId
string
required

Trading plan for every account in the batch

Example:

"550e8400-e29b-41d4-a716-446655440000"

tradingRuleId
string

Override the plan's default rule (optional)

initialBalance
number

Starting balance (defaults to the plan's account size). 0 is kept: send 0 for accounts that start at 0.

Required range: 0 <= x <= 100000000
Example:

50000

customerIdPrefix
string

REQUIRED. Each account gets customerId {prefix}-001, {prefix}-002, ... — one placeholder customer per account (right for giveaways where every key goes to a different winner). PATCH the real customerId onto an account once you know who it belongs to.

Maximum string length: 200
Example:

"promo-summer"

externalRefPrefix
string

DEPRECATED alias for customerIdPrefix — accepted for backward compatibility only.

Maximum string length: 200
Example:

"promo-summer"

metadata
object

Custom metadata applied to every account in the batch. At most 16 KB as JSON, 50 top-level keys and 5 levels of nesting; larger metadata returns 400 METADATA_TOO_LARGE.

Example:

Response

Success - batch created

success
boolean
Example:

true

message
string
Example:

"25 unlinked account(s) created — hand each importKey to its trader"

data
object