Migrate Users With Wallets (CSV)
Migrates users that already have an address from an uploaded CSV file. 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: every row needs a non-empty wallet_address and chain_id.
Required permission: user:create
Request
POST /v2/users/migrate/with-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 wallet_address and 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 |
|---|---|---|
wallet_address | Yes | Stored lower-cased |
chain_id | Yes | Chain (chains id) the address lives 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,wallet_address,chain_id,kyc_sent
john@example.com,John,Doe,0xAbCdEf0123456789ABCDEF0123456789ABCDEF01,6740e0a10000000000000101,false
KVKK mode (no personal data):
external_id,wallet_address,chain_id,kyc_sent
EXT-1042,0xAbCdEf0123456789ABCDEF0123456789ABCDEF01,6740e0a10000000000000101,true
EXT-1043,0x2222222222222222222222222222222222222222,6740e0a10000000000000101,false
Example
curl --request POST \
--url '{{baseUrl}}/v2/users/migrate/with-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-1042", "user_id": "6913872755654191dede37da", "status": "created" },
{ "external_id": "EXT-1043", "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: wallet_address / 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.