neosourceDocs
Search docs

Rename a passkey

PATCH/api/auth/webauthn/credentials/{credential_id}

renamePasskey

Authenticated (session cookie). The label is cosmetic and carries no authority, so this is not sudo-gated. Scoped to the caller's own credentials: renaming someone else's is a 404, indistinguishable from one that does not exist.

Requires authentication using a session cookie — see tokens and scopes.

curl

curl -X PATCH 'https://neosource.dev/api/auth/webauthn/credentials/CREDENTIAL_ID' \
  -b 'ns_session=$NEOSOURCE_SESSION' \
  -H 'Content-Type: application/json' \
  -d '{"label":"string"}'

fetch

fetch("https://neosource.dev/api/auth/webauthn/credentials/CREDENTIAL_ID", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
  },
  credentials: "include",
  body: JSON.stringify({"label":"string"}),
});

Path parameters

credential_idrequired

Base64url credential ID from the list response

string

Request bodyrequired

application/json

PasskeyRenameRequest

object

Renames a passkey. The label is cosmetic and carries no authority.

labelrequired

string

Truncated to 64 characters; blank falls back to the default.

additional propertiesnot allowed

Responses

204Renamed

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 401Authentication required
  • 404No such passkey on this account
  • 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