Skip to main content

Migrate Users With Wallets (CSV)

Migrates users from a CSV file upload when each user already has a wallet address. Limits and response shape mirror the Bulk JSON endpoint: up to 500 rows, maximum file size 5 MB, per-row results.

Request

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

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication
Content-TypeRequired. Must be multipart/form-data

Form Fields

NameDescription
fileRequired. The CSV file. The first row is interpreted as the header.

CSV Format

The first row is the header. Only wallet_address is required; every other column is optional and may be omitted from the file entirely.

ColumnTypeRequiredNotes
wallet_addressstringYesLower-cased server-side.
external_idstringNoRequired if email is absent. Whitespace trimmed.
emailstringNoRequired if external_id is absent.
namestringNoStored as null if absent or empty.
surnamestringNoStored as null if absent or empty.
kyc_sentbooleanNoDefault false. Accepted truthy values: true, 1, yes, y (case-insensitive).

A UTF-8 BOM at the start of the file is tolerated. Column order does not matter — the parser keys by header name.

Example — Classic mode (one row)

email,name,surname,wallet_address,kyc_sent
john@example.com,John,Doe,0xAbCdEf0123456789ABCDEF0123456789ABCDEF01,false

Example — KVKK mode (no personal info)

external_id,wallet_address,kyc_sent
EXT-1042,0xAbCdEf0123456789ABCDEF0123456789ABCDEF01,true
EXT-1043,0x2222222222222222222222222222222222222222,false

Example — Mixed

external_id,email,name,surname,wallet_address,kyc_sent
EXT-1042,,,,0x1111111111111111111111111111111111111111,true
,alice@example.com,Alice,Smith,0x2222222222222222222222222222222222222222,false

cURL Example

curl --location '{{baseUrl}}/v2/users/users/migrate/with-wallet/csv' \
--header 'Authorization: Bearer <token>' \
--form 'file=@./users.csv'

Response

Identical to the Bulk JSON endpoint: aggregate counts plus a results[] array of per-row outcomes.

{
"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" }
]
}

Status Codes

Status CodeDescription
200Success — per-row results returned.
400Bad Request — file missing, file too large, header missing wallet_address, CSV exceeds row limit, or empty file.
401Unauthorized — Invalid or missing authentication token.
500Internal Server Error.

Common 400 Error Messages

MessageCause
file is requiredThe file form field is missing.
file too largeFile exceeds 5 MB.
csv header is requiredFirst row could not be parsed.
missing csv column: wallet_addressThe required column is absent from the header.
csv exceeds row limitMore than 500 data rows.
csv has no rowsHeader present but no data rows.