Creates a new user associated with a partner's account using the provided authentication method and identifier. This endpoint allows partners to register their users with specific authentication methods such as email, phone number, or none.
Headers
PartnerApiKey (string) - API key associated with the partner.
Partner API Key Required
Requires
partner-api-key
for authentication to ensure only authorized partners can access this data.See 🔑 API Key Generation Guide for getting your API key
Body:
- externalUserId (string) - The partner's own user identifier for the user.
We need an
externalUserId
This
ID
is essential for ensuring idempotency, meaning that repeated requests with the sameID
will not create duplicate records.
- method (string, optional) - The method used to authenticate the user. Must be ONE of the following values from AuthenticationMethods:
EMAIL
PHONE_NUMBER
NONE
.
- identifier (string, optional) - The identifier used to authenticate the user. This field's requirements vary based on the method:
- If method is
EMAIL
: Must be a valid email address.
Example: "[email protected]" - If method is
PHONE_NUMBER
: Must be a valid phone number in international format.
Example: "+524401234567" - If method is
NONE
: Can be null.
- If method is
Example
{
"externalUserId": "91b95244-72ca-459e-88d2-281c3e2935c1",
"method": "EMAIL",
"identifier": "[email protected]"
}
Use cases
Register a User with Email Authentication
A partner wants to register a new user using their email address. The method is set to EMAIL
, and the identifier is the user's email. The request is sent, and the new userId
is returned upon successful registration.
Register a User with Phone Number Authentication
A partner registers a user using their phone number. The method is set to PHONE_NUMBER
, and the identifier is the user's phone number. The userId
is generated and returned.
Register a User Without Authentication
A partner registers a user without specifying any authentication method. The method is set to NONE
, and the identifier is null. The userId
is generated and returned.