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
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Content-Type | Required. multipart/form-data |
Body
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | The 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.
| Column | Required | Notes |
|---|---|---|
chain_id | Yes | Chain (chains id) to create the custody wallet on |
external_id | No | Required when email is empty |
email | No | Required when external_id is empty |
name | No | Not stored when empty |
surname | No | Not stored when empty |
kyc_sent | No | Default 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.
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | file is required: the file form field is missing |
| 400 | 10015 | file too large: more than 5 MB |
| 400 | 10015 | csv header is required: the first row could not be read |
| 400 | 10015 | missing csv column: chain_id |
| 400 | 10015 | csv exceeds row limit: more than 500 data rows |
| 400 | 10015 | csv has no rows: header only |
See Errors for the error format and common codes.