# Migrate users in bulk Migrate users in bulk into your environment. Provide an array of users in the request body. Each user object must include the user's email and tenantId, which specifies the user's parent account. You can include additional fields as needed to store more information. If you need to store custom data, use the metadata property. Endpoint: POST /resources/migrations/v1/local/bulk Security: bearer ## Request fields (application/json): - `users` (array, required) - `users.tenantId` (string, required) The tenant id of the user - `users.name` (string) The name of the user - `users.profilePictureUrl` (string) The profile picture url of the user - `users.passwordHash` (string) The password hash. For SCrypt should include the salt and key seperated by the salt separator - `users.passwordHashType` (string) Enum: "bcrypt", "scrypt", "firebase-scrypt", "pbkdf2", "argon2", "sha256", "sha1" - `users.passwordHashConfig` (string) Stringified JSON Hashing config for the migrated password. For SCrypt should be formatted as { saltSeparator, N, r, p, keyLen }. For FirebaseScrypt should be formatted as { memCost, rounds, saltSeparator, signerKey } - `users.authenticatorAppMfaSecret` (string) The authenticator app MFA secret - `users.phoneNumber` (string) phoneNumber can be used both for login with SMS and for MFA This auto-enrolls the user in MFA, prompting them at first login (regardless of tenant/vendor MFA settings). The required format is an area code + number, no spaces. For example: "+16037184056" The number must be unique - `users.phoneNumberType` (string) Enum: "auth", "mfa" - `users.provider` (string) Enum: "local", "saml", "google", "github", "facebook", "microsoft", "scim2", "slack", "apple" - `users.metadata` (string) Stringified JSON object - `users.roleIds` (array) Role ids of the migrated users. If not provided, the user will be assigned the default roles - `users.vendorMetadata` (string) Extra vendor-only data. stringified JSON object - `users.externalId` (string) The external id of the user - `users.username` (string) The username of the user. If not provided, the email is required. Maximum length is 255 characters. - `users.email` (string, required) The email of the user. If not provided, the username is required - `users.verifyUser` (boolean) Whether to verify the user as part of the migration process. If this is set to false, another call is required for the verify user API ## Response 202 fields (application/json): - `migrationId` (string, required)