Skip to main content
POST
/
auth
/
challenges
Create an authentication challenge
curl --request POST \
  --url https://api.guile.app/auth/challenges \
  --header 'Content-Type: application/json' \
  --data '
{
  "phoneNumber": "<string>",
  "emailAddress": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Body

application/json

The request body for issuing a new authentication challenge. Challenge methods are mutually exclusive.

phoneNumber
string<phoneNumber>

The phone number of a user to trigger a one-time passcode validation for.

emailAddress
string<emailAddress>

The email address of a user to trigger a one-time passcode validation for.

Required string length: 6 - 100

Response

Created.

The JSON representation of an authentication challenge.

id
string<uuid>
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.