LoguDocs
Open Logu

Sign-in · registerPasskey

Add a passkey

POST /api/auth/passkeys/register

Verifies the authenticator's response (user verification required) and saves the passkey. Needs a sign-in from the last 24 hours (forbidden otherwise).

Who may call it
Anyone (no credentials)
Server
https://api.logu.dev

Request body#

Content type application/json (required).

FieldTypeRequiredNotes
responseobjectrequiredThe authenticator's response (startRegistration / startAuthentication).
challengeTokenstringrequired16–1000 chars
namestringoptionalRegistration only: a name (≤ 64).
{
  "response": {
    "id": "cred"
  },
  "challengeToken": "aS7dQ2xLp9Vt4mKz.signature",
  "name": "Chrome · macOS"
}

Example#

curl -s -X POST "https://api.logu.dev/api/auth/passkeys/register" \
  -H "Authorization: Bearer $LOGU_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"response":{"id":"cred"},"challengeToken":"aS7dQ2xLp9Vt4mKz.signature","name":"Chrome · macOS"}'

Responses#

201

The passkey.

{
  "id": "pk_9f2c1e",
  "name": "Chrome · macOS",
  "provider": "Google Password Manager",
  "backedUp": true,
  "createdAt": "2026-10-12T14:03:11.000Z"
}
Response fields
FieldTypeRequiredNotes
idstringrequired
namestring | nullrequired
providerstring | nullrequired
backedUpbooleanrequired
createdAtstring | nullrequired

Errors#

Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.

StatusCodeMeaning
400unknown_fieldThe body has a field the endpoint doesn't know (often a typo or snake_case).
400bad_requestThe request is malformed or a field is invalid (see issues).
401unauthorizedNo credentials, or the API key or session is invalid or revoked.
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
500internal_errorSomething went wrong on Logu's side.