Create a user

How to create a new user.

A User represents an end user of your application. You can create a new User for each of your end-users. Each User can have one or multiple wallets which only the User can access.

If your application does not have end users, the User can represent your company or account. For example, when using the Wallet API for company treasury purposes, the User would be your company. In any scenario, you will have at least one User who possesses one or more wallets.

Use the reference param in the request body to assign a reference for your user. This makes it easy to search for a specific user. The reference can also be a unique ID that you create and store in your company's database.

While creating a user, you can also create their signing method. Remember, the first signing method should always be PIN.

📘

Request Endpoint: reference

POST /api/users
ParameterParam TypeDescriptionData TypeMandatory
referenceBodyA free-form text to specify a reference for the user you create. It can help group specific users.String
signingMethodBodyThis object has information about the signing method type and its value.Object
signingMethod.typeBodyThe type of signing method to create for this user. Allowed values: PIN, BIOMETRIC, EMERGENCY_CODEString
signingMethod.valueBodyThe value of the signing method. For PIN, the value should be 6 digits. For EMERGENCY_CODE, the value should be 25 characters, or you can leave it blank to autogenerate the code with the correct entropy.String

Request Body:

{
  "reference": "Test User"
}

Response Body:

ParamDescription
result.idThis is the user ID.
result.referenceThis is the user's reference, which can be used when searching for a specific user.
{
    "success": true,
    "result": {
        "id": "aee7260f-9348-4b73-b06b-f62c0f9751e4",
        "reference": "Test User",
        "createdAt": "2024-06-12T13:14:26.437357135"
    }
}