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
| Name | Description |
|---|---|
Authorization | Required. Bearer token for authentication |
Content-Type | Required. Must be application/json |
Request Body
| Field | Type | Description |
|---|---|---|
users | array | Required. 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
| Field | Type | Description |
|---|---|---|
total | integer | Number of rows in the request. |
success | integer | Rows that resulted in a created user. |
skipped | integer | Rows skipped for a known reason (duplicate, missing identity). |
failed | integer | Rows that errored unexpectedly (e.g. database failure). |
results | array | Per-row results, in the same order as the request. |
Each results[] entry has the following fields:
| Field | Type | Description |
|---|---|---|
email | string | Original email from the request (omitted if absent). |
external_id | string | Original external_id from the request (omitted if absent). |
user_id | string | Created user's ID. Present only for created rows. |
status | string | created | skipped | failed. |
reason | string | Failure reason. Present on skipped and failed rows. |
Possible reason Values
| Reason | Meaning |
|---|---|
missing_email_and_external_id | Row had neither identifier. |
duplicate_email | A user with the same email already exists. |
duplicate_external_id | A user with the same external_id already exists. |
duplicate_wallet | A user with the same wallet address already exists. |
| free-text | Unexpected failure during create or publish (e.g. database error). |
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success — per-row results returned. Inspect results[].status for individual outcomes. |
| 400 | Bad Request — request body invalid (empty array, > 500 rows, missing wallet_address on a row). |
| 401 | Unauthorized — Invalid or missing authentication token. |
| 500 | Internal Server Error. |