Passkeys
Verify passkey registration
POST
/api/v1/auth/passkey/register/verifyConfirms a newly created passkey using the browser's WebAuthn attestation response and saves it to the account.
Requires Authorization
Authenticated action
Body parameters
responseobjectrequired | The WebAuthn attestation response object from navigator.credentials.create(). |
deviceNamestring | Label shown for this passkey in account settings. |
Request
curl --request POST \
--url https://api.swiftgoma.com/api/v1/auth/passkey/register/verify \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"response": {
"id": "cred-id-base64url",
"rawId": "cred-id-base64url",
"type": "public-key"
},
"deviceName": "Chrome on macOS"
}'201Example response
{
"success": true,
"data": {
"id": "pk_9a8b7c6d",
"deviceName": "Aline's iPhone",
"createdAt": "2026-02-01T09:12:00.000Z"
}
}