auth

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-auth"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/8834a97f-36a0-4c36-939c-0fdb4d64a504/social-card.svg?v=3e7ae33eec8b" alt="auth" width="600" height="315"></a>
POSThttps://lucidace.com/v1/auth/mfa/confirm

Confirm enrolment with a code; returns recovery codes once and rotates the session.

Request body

application/json
codestringrequired
{
  "code": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/mfa/confirm" \
  -H "Content-Type: application/json" \
  -d '{"code":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "recovery_codes": [
    "string"
  ]
}
Schema
recovery_codesstring[]required
Single-use; shown only in this response.
400
401 wrong code
POSThttps://lucidace.com/v1/auth/mfa/disable

Turn 2FA off (needs password and a current code). Blocked while an org requires 2FA.

Request body

application/json
codestringrequired
passwordstringrequired
{
  "code": "string",
  "password": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/mfa/disable" \
  -H "Content-Type: application/json" \
  -d '{"code":"string","password":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
401
403
POSThttps://lucidace.com/v1/auth/mfa/enroll

Begin enrolment: returns the secret once. Calling again before confirming replaces it.

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/mfa/enroll"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "otpauth_uri": "string",
  "secret": "string"
}
Schema
otpauth_uristringrequired
otpauth:// URI; render it as a QR code.
secretstringrequired
Base32 secret for manual entry. Shown only in this response.
409 already enabled
GEThttps://lucidace.com/v1/auth/passkeys

Code samples

cURL
curl -X GET "https://lucidace.com/v1/auth/passkeys"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
[
  {
    "created_at": "2024-01-01T00:00:00Z",
    "id": "string",
    "last_used_at": "2024-01-01T00:00:00Z",
    "name": "string"
  }
]
Schema
created_atstringrequired
idstringrequired
last_used_atstring
namestringrequired
POSThttps://lucidace.com/v1/auth/passkeys/login/options

Request body

application/json
mfa_tokenstring
From a password login that answered mfa_required: use the passkey as the second factor.
{
  "mfa_token": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/passkeys/login/options" \
  -H "Content-Type: application/json" \
  -d '{"mfa_token":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "challenge_id": "string",
  "public_key": {}
}
Schema
challenge_idstringrequired
public_keyobjectrequired
401
429
POSThttps://lucidace.com/v1/auth/passkeys/login/verify

Request body

application/json
authenticator_datastringrequired
challenge_idstringrequired
client_data_jsonstringrequired
credential_idstringrequired
base64url credential id.
mfa_tokenstring
signaturestringrequired
DER ECDSA signature, base64url.
{
  "authenticator_data": "string",
  "challenge_id": "string",
  "client_data_json": "string",
  "credential_id": "string",
  "mfa_token": "string",
  "signature": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/passkeys/login/verify" \
  -H "Content-Type: application/json" \
  -d '{"authenticator_data":"string","challenge_id":"string","client_data_json":"string","credential_id":"string","mfa_token":"string","signature":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Sets the session cookie
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "email": "string",
  "id": "string",
  "is_disabled": true,
  "name": "string"
}
Schema
created_atstringrequired
emailstringrequired
idstringrequired
is_disabledbooleanrequired
namestringrequired
401
429
POSThttps://lucidace.com/v1/auth/passkeys/register/options

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/passkeys/register/options"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

POSThttps://lucidace.com/v1/auth/passkeys/register/verify

Request body

application/json
attestation_objectstringrequired
base64url attestationObject.
challenge_idstringrequired
client_data_jsonstringrequired
base64url clientDataJSON.
namestringrequired
{
  "attestation_object": "string",
  "challenge_id": "string",
  "client_data_json": "string",
  "name": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/passkeys/register/verify" \
  -H "Content-Type: application/json" \
  -d '{"attestation_object":"string","challenge_id":"string","client_data_json":"string","name":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "id": "string",
  "last_used_at": "2024-01-01T00:00:00Z",
  "name": "string"
}
Schema
created_atstringrequired
idstringrequired
last_used_atstring
namestringrequired
400
409 credential already registered
DELETEhttps://lucidace.com/v1/auth/passkeys/{id}

Parameters

idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/auth/passkeys/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
404
POSThttps://lucidace.com/v1/auth/password/forgot

Start a password reset. Always 202 so the response does not reveal whether the email exists.

Request body

application/json
emailstringrequired
{
  "email": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/password/forgot" \
  -H "Content-Type: application/json" \
  -d '{"email":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

202
429 rate limited; Retry-After set
POSThttps://lucidace.com/v1/auth/password/reset

Set a new password with a reset token; revokes every session of the account.

Request body

application/json
passwordstringrequired
tokenstringrequired
{
  "password": "string",
  "token": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/password/reset" \
  -H "Content-Type: application/json" \
  -d '{"password":"string","token":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
400 weak password or invalid/expired token
GEThttps://lucidace.com/v1/auth/sessions

The caller's live sessions.

Code samples

cURL
curl -X GET "https://lucidace.com/v1/auth/sessions"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
[
  {
    "created_at": "2024-01-01T00:00:00Z",
    "current": true,
    "expires_at": "2024-01-01T00:00:00Z",
    "id": "string",
    "last_seen_at": "2024-01-01T00:00:00Z",
    "user_agent": "string"
  }
]
Schema
created_atstringrequired
currentbooleanrequired
The session making this request.
expires_atstringrequired
idstringrequired
last_seen_atstringrequired
user_agentstringrequired
401
DELETEhttps://lucidace.com/v1/auth/sessions/{id}

Revoke one of the caller's own sessions.

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/auth/sessions/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
404
POSThttps://lucidace.com/v1/auth/signup

Start signup. Always answers 202 "check your email" so the response never reveals whether the address is registered: a new address gets its account (unverified, no session, no project) plus a verification mail; a registered one gets a "someone tried to sign up" mail instead. Sign in with the password afterwards; the sandbox project is created from the dashboard.

Request body

application/json
captcha_tokenstring
The widget's response token; required when the deployment turned CAPTCHA on (see /v1/auth/config).
emailstringrequired
namestring
org_namestring
passwordstringrequired
10 to 256 characters, not in the bundled breached-password list.
{
  "captcha_token": "string",
  "email": "string",
  "name": "string",
  "org_name": "string",
  "password": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/auth/signup" \
  -H "Content-Type: application/json" \
  -d '{"captcha_token":"string","email":"string","name":"string","org_name":"string","password":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

202 Same answer whether or not the email is registered
Example
{
  "message": "string"
}
Schema
messagestringrequired
400
429 rate limited; Retry-After set

Updated