Skip to main content
POST

Body

application/json

The request body for issuing a new authentication challenge.

For OTP authentication, either phoneNumber or emailAddress is required. For passkey authentication, phoneNumber or emailAddress is optional (enables usernameless flow when omitted).

method
enum<string>
default:otp

The authentication method to use. Defaults to "otp" for backward compatibility.

Available options:
otp,
passkey
phoneNumber
string<phoneNumber>

Phone number used for OTP delivery or username-first passkey authentication. Required for OTP unless emailAddress is provided; optional for passkey.

Required string length: 6 - 32
Pattern: ^\+?[0-9]{1,3}?[ .-]?\(?[0-9]{1,4}?\)?[ .-]?[0-9]{1,4}?[ .-]?[0-9]{1,4}?[ .-]?[0-9]{1,9}$
emailAddress
string<emailAddress>

Email address used for OTP delivery or username-first passkey authentication. Required for OTP unless phoneNumber is provided; optional for passkey.

Required string length: 6 - 100

Response

Created.

Response from creating an authentication challenge.

The response type depends on the authentication method specified in the request:

  • For OTP method: Returns a Challenge with ID and expiration
  • For passkey method: Returns PasskeyAuthenticationOptions with WebAuthn challenge.
id
string
required

The unique, opaque system identifier for a resource. This case-sensitive ID is also used as path parameters in URLs or in other properties or parameters that reference a resource by ID rather than URL.

expiresAt
string<date-time>
required

The expiration datetime of the challenge in the ISO-8601 format.