Operation Type (for Signing)
Request Body
| Field | Type | Need | Description | Example |
|---|---|---|---|---|
”account” | string | required | User’s wallet address | 42trU9A5… |
“signature” | string | required | Cryptographic signature | 5j1Vy9Uq… |
“timestamp” | integer | required | Current timestamp in milliseconds | 1716200000000 |
”label” | string | required | Your name for the factor. 1 to 64 characters, with no control characters and no leading or trailing spaces | Authenticator app |
”expiry_window” | integer | optional | Signature expiry in milliseconds | 30000 |
”two_factor” | object | conditional | Proof. Required while 2FA is on. Not part of the signed payload. See Proofs |
two_factor. Any proof type works, including a recovery key. After the proof passes, you can send the same request with the same label again for 5 minutes without a new proof.
An account has one authenticator app. If it already has one, the new one replaces it when you finish enrollment.
Signing
Signlabel as the data object. Do not sign two_factor. For the request above, the message to sign is:
Response
- Status 200: Enrollment started
Codes use SHA-1, 6 digits, and a 30-second period. The authenticator app shows the issuer
Pacifica and a short form of your wallet address.
Keep the secret private. Anyone who has it can make codes.
- 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