POST
/
v1
/
access
/
otp
curl --request POST \
  --url https://api.oneofnone.io/v1/access/otp \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "email": "jsmith@example.com",
  "expires": 2
}'
{
  "id": "5d162e6f-20ed-4a8c-b7bb-44a53b6f7d8a",
  "message": "OTP sent successfully",
  "email": "user@example.com"
}

Authorizations

x-api-key
string
header
required

The API key required for accessing protected routes. It should be included in the request headers as x-api-key.

Body

application/json
email
string
required

The email address for which to generate the OTP.

expires
integer

Optional. The expiration time of the OTP in seconds.

Required range: x >= 1

Response

201
application/json
OTP generated and sent successfully.
id
string

The ID of the generated OTP record.

Example:

"5d162e6f-20ed-4a8c-b7bb-44a53b6f7d8a"

message
string

Confirmation message that the OTP has been sent.

Example:

"OTP sent successfully"

email
string

The email to which the OTP was sent.

Example:

"user@example.com"