Skip to main content

Create a User

Create a new user.

caution

This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Create Object endpoint instead.

Endpoint

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 alphanumeric chars and/or '-', '_', and '@'.JSON bodyno
emailEmail address for this user (optional). Designed to be used as a UI-friendly identifier.JSON bodyno

Create a User with Provided Id

Request

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

Response

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

Create a User with Generated Id

Request

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

Response

{
"userId": "dkfi7a0s-784e-407e-a1ea-42a91d4c52b9",
"email": null
}