1. Docs
  2. API Reference
  3. Complete passkey enrollment

Complete passkey enrollment

POST/v1/auth/mfa/webauthn/enroll/verify

Completes passkey enrollment by verifying the attestation response against the nonce sealed in enrollment_token and storing the credential under label. The first factor also returns the one-time recovery codes. Responds 400 when the token is invalid or the attestation fails to verify. Rate-limited to 10 requests per minute.

Authentication

Bearer TokenAuthorization

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

Request body

application/json

enrollment_tokenstring Required

The sealed enrollment_token returned by /mfa/webauthn/enroll/options. Carries the WebAuthn challenge nonce server-side.

responseobject Required

The PublicKeyCredential JSON returned by `navigator.credentials.create()` — id, rawId, type, response { clientDataJSON, attestationObject, transports }, clientExtensionResults.

labelstring Required

User-facing nickname for the factor ("YubiKey 5C", "MacBook passkey").

max length 80

Responses

application/json

  • dataMfaWebAuthnEnrollVerifyResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Rate limit

10 requests per 1mPer caller: the signed-in user for a bearer token; for an API key, the key and the end user's address when a backend forwards it, otherwise the client address

Returned object

Request
curl -X POST "https://auth.canopy-io.com/v1/auth/mfa/webauthn/enroll/verify" \
  -H "Authorization: Bearer $CANOPY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "enrollment_token": "string",
    "response": {},
    "label": "MacBook passkey"
  }'
Response
{
  "data": {
    "factor": {
      "id": "00000000-0000-0000-0000-000000000000",
      "type": "totp",
      "label": "iPhone 15",
      "enrolled_at": "2026-04-20T12:00:00.000Z",
      "last_used_at": "2026-04-20T12:00:00.000Z",
      "webauthn_rp_id": "acme.com"
    },
    "recovery_codes": [
      "ABCD-EFGH-IJKL-MNOP",
      "QRST-UVWX-YZ23-4567",
      "..."
    ],
    "recovery_codes_generation": 0
  }
}
Related endpoints
GETList the caller's enrolled second factors
POSTBegin authenticator app enrollment
POSTComplete authenticator app enrollment
POSTBegin passkey enrollment
POSTProve a fresh second factor before a sensitive change
POSTBegin a passkey step-up
POSTComplete a passkey step-up
DELETERemove one of the caller's second factors
GETHow many recovery codes the caller has left
POSTRegenerate the caller's recovery codes
GETList the caller's remembered devices
DELETEForget every remembered device
DELETEForget one remembered device
Was this page helpful?

Tell us how we can improve this guide.