Create Account

How to create a user account for an existing intermediary.

The Create Intermediary Account API creates a new user account for an existing intermediary. This API should be used when you want to create a digital lending account for an intermediary.

After the account is created, they will be signed in. You can add additional logic to your sign-in flow, including multi-factor phone authentication and email verification, by referring to response header. The header contains two fields encoded in the x-digifi-account JSON base64 string: isEmailNotVerified and isMfaIncomplete. These will either be true or undefined (no falsy value). Check these flags to optionally enforce phone authentication or email verification.

Please note the following validations:

  • Each intermediary can have only one user account (or zero).
  • Every user account should have a unique email address.
  • The "password" parameter must meet the following criteria: 8+ characters, at least 1 digit, lower case letter, upper case letter. (optional, if not passed, then we will generate a strong/unique password)

Example Requests

Below please find the JSON body for two example requests:

  • Example 1: Creating an account that includes a phone number.
  • Example 2: Creating an account without a phone number.
{
    "email": "[email protected]",
    "password": "[email protected]!",
    "phone": "+19172249999",
    "intermediaryId": "507f281e810c19729de860ea"
}
{
    "email": "[email protected]",
    "password": "123QWEqwe",
    "intermediaryId": "507f281e810c19729de860ea"
}
{
    "email": "[email protected]",
    "phone": "+19172249999",
    "intermediaryId": "507f281e810c19729de860ea"
}
Language