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
.
- Read more about User Management.
- Learn how to create a signing method for a user.
Request Endpoint: reference
POST /api/users
Parameter | Param Type | Description | Data Type | Mandatory |
---|---|---|---|---|
reference | Body | A free-form text to specify a reference for the user you create. It can help group specific users. | String | ❌ |
signingMethod | Body | This object has information about the signing method type and its value. | Object | ❌ |
signingMethod.type | Body | The type of signing method to create for this user. Allowed values: PIN, BIOMETRIC, EMERGENCY_CODE | String | ❌ |
signingMethod.value | Body | The 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:
Param | Description |
---|---|
result.id | This is the user ID. |
result.reference | This 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"
}
}
Updated 4 months ago