Skip to main content

Migrate Users With Wallets (Bulk)

Migrates up to 500 users in a single request when each user already has a wallet address. Failures are reported per row — the request itself succeeds with HTTP 200 even when individual rows are skipped.

Request

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

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication
Content-TypeRequired. Must be application/json

Request Body

FieldTypeDescription
usersarrayRequired. 1–500 user objects. Each object follows the single endpoint schema.

Example

curl --location '{{baseUrl}}/v2/users/users/migrate/with-wallet/bulk' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"users": [
{
"email": "alice@example.com",
"name": "Alice",
"surname": "Smith",
"wallet_address": "0x1111111111111111111111111111111111111111"
},
{
"external_id": "EXT-2042",
"wallet_address": "0x2222222222222222222222222222222222222222",
"kyc_sent": true
},
{
"email": "dup@example.com",
"wallet_address": "0x3333333333333333333333333333333333333333"
}
]
}'

Response

Status Code: 200 OK

{
"total": 3,
"success": 2,
"skipped": 1,
"failed": 0,
"results": [
{
"email": "alice@example.com",
"user_id": "6913872755654191dede37da",
"status": "created"
},
{
"external_id": "EXT-2042",
"user_id": "6913872755654191dede37db",
"status": "created"
},
{
"email": "dup@example.com",
"status": "skipped",
"reason": "duplicate_email"
}
]
}

Response Fields

FieldTypeDescription
totalintegerNumber of rows in the request.
successintegerRows that resulted in a created user.
skippedintegerRows skipped for a known reason (duplicate, missing identity).
failedintegerRows that errored unexpectedly (e.g. database failure).
resultsarrayPer-row results, in the same order as the request.

Each results[] entry has the following fields:

FieldTypeDescription
emailstringOriginal email from the request (omitted if absent).
external_idstringOriginal external_id from the request (omitted if absent).
user_idstringCreated user's ID. Present only for created rows.
statusstringcreated | skipped | failed.
reasonstringFailure reason. Present on skipped and failed rows.

Possible reason Values

ReasonMeaning
missing_email_and_external_idRow had neither identifier.
duplicate_emailA user with the same email already exists.
duplicate_external_idA user with the same external_id already exists.
duplicate_walletA user with the same wallet address already exists.
free-textUnexpected failure during create or publish (e.g. database error).

Status Codes

Status CodeDescription
200Success — per-row results returned. Inspect results[].status for individual outcomes.
400Bad Request — request body invalid (empty array, > 500 rows, missing wallet_address on a row).
401Unauthorized — Invalid or missing authentication token.
500Internal Server Error.