User Register

Register your partner users into the Treasury system to begin managing their digital assets and processing transactions. This endpoint implements robust multi-key distributed locking to prevent duplicate user creation under high concurrency.

Register User

POST /user/register

Headers

Header / TypeConditionDescription
Authorizationstring
required
Bearer token retrieved from the Authentication endpoint.

JSON Body

Field / TypeConditionDescription
namestring
required
Full name of the user.
genderstring enum
required
The gender of the user. Value: male or female.
email_addressstring
required
optional
Unique email address of the user.
phone_numberstring
required
optional
Contact phone number for the user.
ninstring
required
optional
National Identification Number (NIN) of the user.
partner_user_idstring
optional
User ID from partner's side.
ℹ️

Note: The required / optional condition for email_address, phone_number, and nin fields is based on your partner configuration from the Treasury side.

Example Request

json
{
  "name"           : "Jane Cooper",
  "gender"         : "female",
  "email_address"  : "[email protected]",
  "phone_number"   : "6281234567890",
  "nin"            : "3201010101010001",
  "partner_user_id": "user_1234567890"
}

Response

Sample Response (201 Created)

json
{
  "code"   : 201,
  "message": "success",
  "data"   : {
    "user_id"   : "xid...",
    "created_at": "2026-01-01T12:00:00+07:00"
  }
}
ℹ️
Concurrency Control

If you receive a 409 Conflict (Wait-Timeout Error), it indicates that a registration attempt for this user is already in progress. See Distributed Locking for more details.