POST
Authorization
All you need is to include your secret key as a value of authorization in the header and hit the endpoint above. Use the secret key that matches the mode you are in TEST or LIVE
Request Body
Provide an array of users to create. Each user object should contain an email and optionally a name and country code.An array of user objects to create. Minimum 1 user, maximum 1000 users per request.
The email address of the user. Must be a valid email format.
The name of the user (optional)
A 2-letter ISO country code (e.g., “US”, “GB”, “FR”). Must be uppercase or will be converted to uppercase.
- Users are unique per project and mode combination. The same email can exist in both TEST and LIVE modes.
- Duplicate emails within the same request will be rejected.
- If some users already exist or are invalid, the operation will continue and create the valid, non-duplicate users.
Response
The response includes a summary of the batch operation and details about any issues encountered.Successful
Partial Success Response (Some Issues)
When some users already exist or have validation errors, you’ll receive a 207 Multi-Status response:Error Responses
400 Bad Request - Missing Body
400 Bad Request - Missing Body
Returned when the request body is missing or empty.
400 Bad Request - Invalid Format
400 Bad Request - Invalid Format
Returned when the users array is missing or not an array.
400 Bad Request - Empty Array
400 Bad Request - Empty Array
Returned when the users array is empty.
400 Bad Request - Too Many Users
400 Bad Request - Too Many Users
Returned when the request contains more than 1000 users.
400 Bad Request - Invalid JSON
400 Bad Request - Invalid JSON
Returned when the request body contains malformed JSON.
207 Multi-Status - Validation Issues
207 Multi-Status - Validation Issues
Returned when some users have validation errors. The response includes which users failed and why.
500 Internal Server Error
500 Internal Server Error
Returned when an unexpected error occurs.
Issue Status Types
When issues are reported in the response, they will have one of the following statuses:already_exists: A user with this email already exists in the project for the current mode. The existing user’s data is included in the response.invalid: The user data failed validation (e.g., invalid email format, invalid country code, duplicate in request, missing email).