Skip to content

Update passkey

Update the user ID or passkey username.

Request
PATCH https://api.passlock.dev/{tenancyId}/passkeys/{passkeyId} HTTP/1.1
Authorization: Bearer {apiKey}
Accept: application/json
Content-Type: application/json
{
"userId": "myCustomUserId",
"username": "jdoe@example.com"
}

Note: All fields are optional

HTTP Response:

Response
HTTP/1.1 202 Accepted
Content-Type: application/json
{
"_tag": "Passkey",
"id": "sewqeeqx69cr7axut7kat",
"userId": "puubifsmidah0f8c0y9bm",
"enabled": true,
"credential": {
"id": "bW9wN3IzenE0enJ5OXVnZXoxOWF4",
"userId": "MTVkMTFmdHM1Yzg0bDN0anpieG9w",
"username": "jdoe@example.com",
"aaguid": "0000-0000-0000-0000",
"backedUp": true,
"counter": 0,
"deviceType": "multiDevice",
"transports": ["internal"],
"publicKey": "dGhpcy1pcy1hLWNib3ItcHVibGljLWtleQ",
"rpId": "example.com"
},
"platform": {
"icon": "https://api.passlock.dev/aaguid/0000-0000-0000/icon.svg",
"name": "Apple Passwords"
},
"createdAt": 1770123293,
"updatedAt": 1770123293,
"lastUsed": 1770123293
}

The raw HTTP response has the same shape as Get passkey.

If you call @passlock/server.updatePasskey(), the returned Passkey object decodes credential.publicKey to a Uint8Array in the same way as getPasskey().