Skip to main content
Starts registering a passkey or a security key as a two-factor factor. The response has WebAuthn options for the browser. Pass them to navigator.credentials.create(), then call Finish WebAuthn registration within 10 minutes. Pacifica accepts passkeys only from the Pacifica app. A script or bot cannot register one. API clients should use an authenticator app. See Passkeys and security keys.

Operation Type (for Signing)

Request Body

FieldTypeNeedDescriptionExample
”account”stringrequiredUser’s wallet address42trU9A5…
“signature”stringrequiredCryptographic signature5j1Vy9Uq…
“timestamp”integerrequiredCurrent timestamp in milliseconds1716200000000
”kind”stringrequiredFactor kind:
“passkey"
"security_key”
security_key
”label”stringrequiredYour name for the factor. 1 to 64 characters, with no control characters and no leading or trailing spacesYubiKey 5C
”expiry_window”integeroptionalSignature expiry in milliseconds30000
”two_factor”objectconditionalProof. Required while 2FA is on. Not part of the signed payload. See Proofs
Sign this request with the account’s own key. Agent wallets cannot sign it. The account must be a main account. If 2FA is already on, send a proof in two_factor. Any proof type works, including a recovery key. After the proof passes, you can send the same request with the same kind and label again for 5 minutes without a new proof. This helps when the user cancels the browser prompt. A "passkey" must verify the user with a PIN or biometric. A "security_key" asks the browser for a separate device, such as a USB or NFC key. The device names the new credential with a short form of your wallet address and your label.

Signing

Sign kind and label as the data object. Do not sign two_factor. For the request above, the message to sign is:

Response

  • Status 200: Registration started
The options above are shortened.
  • Status 400: Invalid request parameters, label, or signature
  • Status 401: The proof is wrong, expired, or already used
  • Status 403: The account is a subaccount, or it does not exist
  • Status 422: The account has no room for another factor (a user can have at most 8 factors)
  • Status 428: 2FA is on, and the request has no two_factor
  • Status 429: Too many proof attempts, or more than 20 enrollments started in 10 minutes
  • Status 500: Internal server error
  • Status 503: The two-factor service is unavailable. Retry later

Code Example (Python)