registerPasskey
POST
/api/v1/me/security/passkeys
const url = 'https://example.com/api/v1/me/security/passkeys';const options = { method: 'POST', headers: { 'X-CSRF-Token': 'example', 'X-MFA-Challenge': 'example', 'Content-Type': 'application/json' }, body: '{"id":"example","rawId":"example","type":"public-key","authenticatorAttachment":"platform","clientExtensionResults":{},"response":{"clientDataJSON":"example","attestationObject":"example","transports":["example"]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/me/security/passkeys \ --header 'Content-Type: application/json' \ --header 'X-CSRF-Token: example' \ --header 'X-MFA-Challenge: example' \ --data '{ "id": "example", "rawId": "example", "type": "public-key", "authenticatorAttachment": "platform", "clientExtensionResults": {}, "response": { "clientDataJSON": "example", "attestationObject": "example", "transports": [ "example" ] } }'The passkey is named from the authenticator’s AAGUID; no name is accepted here. Use the rename endpoint to change it.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters”X-CSRF-Token
required
string
X-MFA-Challenge
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
A PublicKeyCredential from navigator.credentials.create(), serialized with base64url binary fields. Parsed by the WebAuthn library rather than field by field.
object
id
required
string
rawId
required
Base64url
string
type
required
string
authenticatorAttachment
string
clientExtensionResults
object
key
additional properties
any
response
required
object
clientDataJSON
required
Base64url
string
attestationObject
required
Base64url
string
transports
Array<string>
Responses
Section titled “ Responses ”Passkey enrolled
Media typeapplication/json
object
data
required
object
id
required
string format: uuid
name
required
string
credentialId
required
string
createdAt
required
string format: date-time
lastUsedAt
string format: date-time
Examplegenerated
{ "data": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "credentialId": "example", "createdAt": "2026-04-15T12:00:00Z", "lastUsedAt": "2026-04-15T12:00:00Z" }}The passkey could not be verified