API reference
POSTRequires Bearer token
Register a WebAuthn credential
/api/v1/mfa/webauthn/register
Submit /api/v1/mfa/webauthn/register. Authenticated routes need Authorization: Bearer {token} from POST /api/v1/login.
Path parameters
This endpoint has no path parameters.
Query parameters
This endpoint has no query parameters.
Request body
| Field | Type | Description |
|---|---|---|
challenge_token Required | string | Token from the options call. e.g. "opaque-challenge" |
credential Required | object | WebAuthn attestation from the authenticator. e.g. {"id":"credential-id","rawId":"credential-id","type":"public-key","response":{"clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0","attestationObject":"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YQ"}} |
name Required | string | Device label. e.g. "MacBook Touch ID" |
Responses
| Status | Meaning |
|---|---|
| 201 | Credential registered |
| 401 | Missing or invalid Bearer token. |