Remove a passkey
DELETE/api/auth/webauthn/credentials/{credential_id}
deletePasskey
Sudo-gated — removing a login method is exactly the class of change that must not ride on a stolen session cookie alone. Refuses with `409` when this passkey is the account's last remaining way in (no password, no linked identity, no other passkey). TOTP does not count: it is a second factor, so an account holding only TOTP is locked out. Scoped to the caller's own credentials: deleting someone else's is a 404.
Requires authentication using a session cookie — see tokens and scopes.
curl
curl -X DELETE 'https://neosource.dev/api/auth/webauthn/credentials/CREDENTIAL_ID' \
-b 'ns_session=$NEOSOURCE_SESSION'fetch
fetch("https://neosource.dev/api/auth/webauthn/credentials/CREDENTIAL_ID", {
method: "DELETE",
credentials: "include",
});Path parameters
credential_idrequiredBase64url credential ID from the list response
Responses
204Removed
403Sudo required — the `challenge` field names which sudo-prove endpoint to call
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 401Authentication required
- 404No such passkey on this account
- 409This is the account's only remaining login method
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget