v1

latestOpenAPI 3.1.02026-07-268342124.0 KB
challenge
sms
email

Initiate challenge

Initiate a challenge by sending a verification code to an email address or phone number.

post/challenge

Request body

verificationMethod'EMAIL_OTP' | 'SMS' | 'WHATSAPP' required

The verification method to use for the challenge.

actionstring required

The action code used to identify the challenge in the Authsignal Portal.

idempotencyKeystring

The idempotency key for the action. An idempotency key can be used to initiate multiple challenges for the same action.

phoneNumberstring

The phone number in E.164 format. Required if the verification method is 'SMS'.

emailstring

The email address. Required if the verification method is 'EMAIL_OTP'.

userIdstring

The primary ID of the user in your system. Required when initiating a challenge to enroll or update an authenticator for an existing user.

scope'add:authenticators' | 'update:authenticators' | 'add:authenticators update:authenticators'

Providing scopes will authorize enrolling or updating an authenticator for an existing user. Must only be provided when initiating a challenge from an already authenticated state.

localestring

The locale of the user in BCP 47 format. Used to localize the pre-built UI, email, and SMS messages.

ipAddressstring

The user's IP address. Can be provided to use rules based on location or other IP-derived features.

userAgentstring

The user agent identifying a browser or app. Can be provided to use rules based on device.

deviceIdstring

An ID which identifies the user's device. Can be provided to use rules based on device.

customobject

A JSON object which can include any key/value pairs. Can be provided to use rules based on your own data points.

Example request

{
  "locale": "es"
}

Response

OK

challengeIdstring required

The ID of the challenge.

idempotencyKeystring required

The idempotency key for the action. An idempotency key can be used to initiate multiple challenges for the same action.

expiresAtnumber required

The challenge expiry as a Unix timestamp in seconds.