v1

latestOpenAPI 3.0.32026-08-064799140.5 KB
Challenges

Create a challenge for a user

Creates a new challenge to verify a login identifier for a user by given userID. Challenges come in three flavors: Email OTP, SMS OTP, and Email Magiclink.

OTP stands for One-Time Password. It is a unique code sent to the user via email or SMS, which they must enter to complete the verification process.

post/users/{userID}/challenges

Path parameters

userIDstring required
Example:usr-4693224802260150919

Unique identifier of the user. Format: usr-<number>.

Request body

challengeType'email_otp' | 'email_link' | 'sms_otp' required
identifierValuestring required
challengeMetadataobject
lifetimeSecondsinteger

Example request

{
  "identifierValue": "jane@doe.com",
  "challengeMetadata": {
    "city": "Munich"
  },
  "lifetimeSeconds": 300,
  "clientInformation": {
    "remoteAddress": "::ffff:172.18.0.1",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
  }
}

Response

Challenge has been created.

challengeIDstring required
type'email_otp' | 'email_link' | 'sms_otp' required
identifierValuestring required
valuestring required
expiresinteger required
status'pending' | 'completed' | 'expired' required