Add Users for Bulk Import
curl -X POST https://your-domain.com/bulk-import/users \
-H "Content-Type: application/json" \
-d '{
"users": [
{
"externalUserId": "user-123",
"userMetadata": {"plan": "premium"},
"userRoles": ["admin"],
"totpDevices": [],
"loginMethods": [
{
"recipeId": "emailpassword",
"email": "[email protected]",
"passwordHash": "$2a$11$hashed_password",
"hashingAlgorithm": "bcrypt",
"isPrimary": true,
"isVerified": true,
"timeJoinedInMSSinceEpoch": 1234567890000,
"tenantIds": ["public"]
}
]
}
]
}'
{
"status": "OK",
"users": [
{
"id": "generated-bulk-import-id",
"status": "NEW"
}
]
}
Array of user objects to import (max 10,000 users)
External user identifier from source system
Custom user metadata as key-value pairs
Array of role names to assign to the user
Array of TOTP device configurations
Array of login method objects (at least one required)
users[].loginMethods[].recipeId
Recipe ID: “emailpassword”, “thirdparty”, or “passwordless”
users[].loginMethods[].email
Email address for the login method
users[].loginMethods[].passwordHash
Hashed password (for emailpassword recipe)
users[].loginMethods[].hashingAlgorithm
Hashing algorithm used: “bcrypt”, “argon2”, etc.
users[].loginMethods[].isPrimary
Whether this is the primary login method
users[].loginMethods[].isVerified
Whether the email/phone is verified
users[].loginMethods[].timeJoinedInMSSinceEpoch
Original join timestamp in milliseconds
users[].loginMethods[].tenantIds
Array of tenant IDs this login method belongs to
Array of objects containing the generated bulk import ID and status for each user
Generated bulk import user ID
curl -X POST https://your-domain.com/bulk-import/import \
-H "Content-Type: application/json" \
-d '{
"externalUserId": "user-123",
"userMetadata": {"plan": "premium"},
"userRoles": ["admin"],
"totpDevices": [],
"loginMethods": [
{
"recipeId": "emailpassword",
"email": "[email protected]",
"passwordHash": "$2a$11$hashed_password",
"hashingAlgorithm": "bcrypt",
"isPrimary": true,
"isVerified": true,
"timeJoinedInMSSinceEpoch": 1234567890000,
"tenantIds": ["public"]
}
]
}'
{
"status": "OK",
"user": {
"id": "user-id",
"isPrimaryUser": false,
"tenantIds": ["public"],
"emails": ["[email protected]"],
"phoneNumbers": [],
"thirdParty": [],
"loginMethods": [
{
"recipeId": "emailpassword",
"recipeUserId": "recipe-user-id",
"tenantIds": ["public"],
"email": "[email protected]",
"timeJoined": 1234567890,
"verified": true
}
],
"timeJoined": 1234567890
}
}
Same user object structure as batch import (see above)
Imported user object with all login methods and metadata
Array of error messages if import failed