DKBSignDocs

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

FieldTypeDescription
challenge_token
Required
stringToken from the options call.
e.g. "opaque-challenge"
credential
Required
objectWebAuthn attestation from the authenticator.
e.g. {"id":"credential-id","rawId":"credential-id","type":"public-key","response":{"clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0","attestationObject":"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YQ"}}
name
Required
stringDevice label.
e.g. "MacBook Touch ID"

Responses

StatusMeaning
201Credential registered
401Missing or invalid Bearer token.

Request

curl
curl -X POST 'https://api.dkbsigns.com/api/v1/mfa/webauthn/register' \
  -H 'Authorization: Bearer $DKBSIGN_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"challenge_token":"opaque-challenge","credential":{"id":"credential-id","rawId":"credential-id","type":"public-key","response":{"clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0","attestationObject":"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YQ"}},"name":"MacBook Touch ID"}'

Response 201

json
{
  "id": "cred-1",
  "name": "MacBook Touch ID"
}