Skip to main content

Create a User

Create a new user.

POST /v1/users

Parameters

ParameterDescriptionTypeRequired
userIdUser defined string identifier for this user. If not provided, Warrant will create an id for the user and return it. In this case, you should store the id in your system as you will need to provide it for any authorization requests for that user. Note that userIds in Warrant must be composed of lower-case alphanumeric chars and/or '-' and '_'.JSON bodyno
usernameAn optional displayable identifier for this user (ex. email, username).JSON bodyno

Create a User with Provided ID

Sample Request

curl "https://api.warrant.dev/v1/users" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{"userId":"d6ed6474-784e-407e-a1ea-42a91d4c52b9"}'

Sample Response

{
"userId": "d6ed6474-784e-407e-a1ea-42a91d4c52b9"
}

Create a User with Generated ID

Sample Request

curl "https://api.warrant.dev/v1/users" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \

Sample Response

{
"userId": "d6ed6474-784e-407e-a1ea-42a91d4c52b9"
}