Skip to content

Authentication Challenge

The authentication challenge resource.

Base/authenticationChallenge
GET/authenticationChallenge

List authentication challenges

Retrieve a paginated list of authentication challenges. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GET/authenticationChallenge
curl --request GET \
  --url '<your-host>/authenticationChallenge?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "purpose": "string",
    "subject": "string",
    "secret": "string",
    "expiresAt": "2026-01-01T00:00:00Z"
  }
]
GET/authenticationChallenge

Retrieve a authentication challenge

Fetch a single authentication challenge by filtering on `purpose`.

Query parameters

purposestring

Match on the authentication challenge's `purpose`, e.g. `eq.{id}`.

GET/authenticationChallenge
curl --request GET \
  --url '<your-host>/authenticationChallenge?purpose=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "purpose": "string",
  "subject": "string",
  "secret": "string",
  "expiresAt": "2026-01-01T00:00:00Z"
}
POST/authenticationChallenge

Create a authentication challenge

Create a new authentication challenge.

Body parameters

secretstringrequired
expiresAttimestamprequired
POST/authenticationChallenge
curl --request POST \
  --url <your-host>/authenticationChallenge \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"secret":"string","expiresAt":"2026-01-01T00:00:00Z"}'
Response
{
  "purpose": "string",
  "subject": "string",
  "secret": "string",
  "expiresAt": "2026-01-01T00:00:00Z"
}
PATCH/authenticationChallenge

Update a authentication challenge

Update an existing authentication challenge, matched on `purpose`.

Body parameters

secretstringrequired
expiresAttimestamprequired
PATCH/authenticationChallenge
curl --request PATCH \
  --url '<your-host>/authenticationChallenge?purpose=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"secret":"string"}'
Response
{
  "purpose": "string",
  "subject": "string",
  "secret": "string",
  "expiresAt": "2026-01-01T00:00:00Z"
}
DELETE/authenticationChallenge

Delete a authentication challenge

Delete a authentication challenge, matched on `purpose`. Returns 204 No Content.

Query parameters

purposestring

The `purpose` of the authentication challenge to delete, e.g. `eq.{id}`.

DELETE/authenticationChallenge
curl --request DELETE \
  --url '<your-host>/authenticationChallenge?purpose=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content