Create User
Creates a user in an App that requires authentication. Each user will have a default wallet created for the wallet_type sent in.
HTTP Request
POST /v1/auth/users/create
Returns
A successful response returns a User
object with email_id
and phone_number_id
properties.
Body
-
email string
Required if phone_number not present
Email that uniquely identifies the user.Minimum length is
1
. -
phone_number string
Required if email not present
E.164 formatted mobile phone number that uniquely identifies the user.Minimum length is
1
. -
first_name string
First name of the user.
Minimum length is
1
. -
middle_name string
Middle name of the user.
-
last_name string
Middle name of the user.
Minimum length is
0
. -
requires_verification boolean
Determines if verification for the authentication method (email, phone_number) is required before marking the user as active.
-
wallet_type string
Determines what type of wallet login. If the user does not have a default wallet of the same wallet_type, a new default wallet will be created for the user. If left blank, the default will be ETH. Possible values: ETH, SOL, BTC, DOT, XLM (more wallets coming soon).
-
include_user boolean
Determines if the full user object should be returned. Defaults to false.
curl \
-X POST https://api.streambird.io/v1/auth/users/create \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"first_name":"John","last_name":"Smith","email":"sandbox@streambird.io","phone_number":"+14152222222","requires_verification":true}'
{
"first_name": "John",
"last_name": "Smith",
"email": "sandbox@streambird.io",
"phone_number": "+14152222222",
"requires_verification": true
}
{
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"status": "pending",
"email_id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
"phone_number_id": "pn_24oXBLRv6BoHXbNZoTAZkAFlRsy"
}