POST /auth /registration

By using POST /auth /registration API, you can complete the user registration process and creates the user’s initial credentials. The type of credentials being registered is determined by the credentialKind field in the nested objects (firstFactorCredential , secondFactorCredential and RecoveryCredential).

Authentication
Registration Code
Required Permissions
No permissions required.
Authorizations
Bearer Token: To authenticate API requests.
Parameters

firstFactorCredential: Register a Fido2 Credential, also known as Passkeys or WebauthN credential.

secondFactorCredential: Register a Fido2 Credential, also known as Passkeys or WebauthN credential.

recoveryCredential: Register a recovery key.

Request body
{
curl --request POST \
  --url https://api.digitalassets.ibm.com/auth/registration \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "firstFactorCredential": {
    "credentialKind": "Fido2",
    "credentialInfo": {
      "credId": "<string>",
      "clientData": "<string>",
      "attestationData": "<string>"
    },
    "credentialName": "<string>"
  },
  "secondFactorCredential": {
    "credentialKind": "Fido2",
    "credentialInfo": {
      "credId": "<string>",
      "clientData": "<string>",
      "attestationData": "<string>"
    },
    "credentialName": "<string>"
  },
  "recoveryCredential": {
    "credentialKind": "RecoveryKey",
    "credentialInfo": {
      "credId": "<string>",
      "clientData": "<string>",
      "attestationData": "<string>"
    },
    "encryptedPrivateKey": "<string>",
    "credentialName": "<string>"
  }
}'
Response
200: Success
{
  "credential": {
    "uuid": "<string>",
    "kind": "Fido2",
    "name": "<string>"
  },
  "user": {
    "id": "<string>",
    "username": "<string>",
    "orgId": "<string>"
  }
}