Skip to content
Esc
navigateopen⌘Jpreview
Dashboard

Register WebAuthn credential

Register a new WebAuthn credential for an existing user

POST/{apiBasePath}/{tenantId}/webauthn/credential
Authorization
AuthorizationBearer token · headerrequired
Returned as the "st-access-token" header from sign-in and refresh endpoints and present on requests that update the access token payload
or
sAccessTokenAPI key · cookierequired
This is an HTTPOnly cookie, set by sign-in and refresh endpoints and present on requests that update the access token
Path parameters
apiBasePathstringrequired
Its value depends on the apiBasePath set by the user
tenantIdstring
The tenant against which the request is made. If left empty, the default tenant will be used.
Header parameters
ridstring
The WebAuthn recipe ID
anti-csrftoken
This will only be here if enabled by the user.
Request body
application/json
webauthnGeneratedOptionsIdstringrequired
credentialregistrationPayloadrequired
WebAuthn registration payload
Show properties
idstringrequired
Credential ID
rawIdstringrequired
Raw credential ID
authenticatorAttachmentstring
Type of authenticator
Allowed:platformcross-platform
clientExtensionResultsobject
Client extension results
responseobjectrequired
Registration response
Show properties
clientDataJSONstringrequired
Client data JSON
attestationObjectstringrequired
Attestation object
authenticatorDatastring
Authenticator data
transportsstring[]
Supported transports
publicKeystring
Public key
publicKeyAlgorithmnumber
Public key algorithm
typestringrequired
Credential type
Allowed:public-key
Responses
200Credential registration response
One of:
object
statusstatusOK
Success status indicator
Allowed:OK
generalErrorResponse
statusstring
Error status code
Allowed:GENERAL_ERROR
messagestring
Error message
object
statusstring
Allowed:INVALID_CREDENTIALS_ERROROPTIONS_NOT_FOUND_ERRORINVALID_OPTIONS_ERRORINVALID_AUTHENTICATOR_ERROR
object
statusstring
Allowed:REGISTER_CREDENTIAL_NOT_ALLOWEDINVALID_AUTHENTICATOR_ERRORp
reasonstring
404Resource not found error
string
500Internal server error
string
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "/auth/public/webauthn/credential" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "webauthnGeneratedOptionsId": "opt_123...",
  "credential": {
    "id": "cred_123...",
    "rawId": "base64rawid...",
    "authenticatorAttachment": "platform",
    "clientExtensionResults": {},
    "response": {
      "clientDataJSON": "base64clientdata...",
      "attestationObject": "base64attestation...",
      "authenticatorData": "base64authenticatordata...",
      "transports": [
        "usb"
      ],
      "publicKey": "base64publickey...",
      "publicKeyAlgorithm": -7
    },
    "type": "public-key"
  }
}'
Response
{
  "status": "OK"
}

API reference

API schema and response details