Skip to main content

Migrate Users Without Wallets (CSV)

Migrates users from an uploaded CSV file; a custody wallet is created asynchronously for each created user. Rows are processed like the bulk endpoint and the response has the same shape. Limits: file at most 5 MB, at most 500 data rows.

CSV rows do not go through the request validation the JSON endpoints apply (email format, required values), so check the file before uploading. In particular every row needs a valid chain_id: a row whose chain does not resolve is reported as failed after its user has been stored without a wallet.

Required permission: user:create

Request​

POST /v2/users/migrate/without-wallet/csv

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>
Content-TypeRequired. multipart/form-data

Body​

FieldTypeRequiredDescription
filefileYesThe CSV file (multipart form field). The first row is the header

CSV format​

The header must contain chain_id; every other column is optional and may be left out of the file. Header names are matched case-insensitively, column order does not matter, a UTF-8 BOM is tolerated and values are trimmed.

ColumnRequiredNotes
chain_idYesChain (chains id) to create the custody wallet on
external_idNoRequired when email is empty
emailNoRequired when external_id is empty
nameNoNot stored when empty
surnameNoNot stored when empty
kyc_sentNoDefault false. true, 1, yes, y (any case) mean true

Classic mode:

email,name,surname,chain_id,kyc_sent
auto@example.com,Auto,Wallet,6740e0a10000000000000101,false
classic@example.com,Classic,User,6740e0a10000000000000101,true

KVKK mode:

external_id,chain_id,kyc_sent
EXT-9001,6740e0a10000000000000101,true
EXT-9002,6740e0a10000000000000101,false

Example​

curl --request POST \
--url '{{baseUrl}}/v2/users/migrate/without-wallet/csv' \
--header 'Authorization: Bearer <access_token>' \
--form 'file=@./users.csv'

Response​

Same shape as the bulk endpoint.

{
"total": 2,
"success": 2,
"skipped": 0,
"failed": 0,
"results": [
{ "external_id": "EXT-9001", "user_id": "6913872755654191dede37da", "status": "created" },
{ "external_id": "EXT-9002", "user_id": "6913872755654191dede37db", "status": "created" }
]
}

Errors​

All are 400 with code 10015; the message names the problem.

StatusCodeDescription
40010015file is required: the file form field is missing
40010015file too large: more than 5 MB
40010015csv header is required: the first row could not be read
40010015missing csv column: chain_id
40010015csv exceeds row limit: more than 500 data rows
40010015csv has no rows: header only

See Errors for the error format and common codes.