Skip to main content
POST
/
api
/
v1
/
users
/
register
Register user, create default wallets, and return user and wallets with balances
curl --request POST \
  --url https://crypto.westminister.tech/api/v1/users/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "tigger.germain@gmail.com",
  "phone_number": "+254723453286",
  "first_name": "Tigger",
  "last_name": "Germain",
  "password": "secret",
  "role": "vendor",
  "kyc_status": "pending",
  "pin": "123456"
}
'
{
  "message": "User registered successfully with default wallets",
  "user": {
    "id": "383f20af-5960-4374-a5c3-b7566ea8f771",
    "email": "tigger.germain@gmail.com",
    "phone_number": 254723453286,
    "first_name": "Tigger",
    "last_name": "Germain",
    "role": "vendor",
    "kyc_status": "pending"
  },
  "wallets": [
    {
      "wallet": {
        "id": "ea963c72-35d4-4a4e-8e32-70971c27f188",
        "user_id": "383f20af-5960-4374-a5c3-b7566ea8f771",
        "name": "Ethereum Wallet",
        "address": 1.0526201056375617e+48,
        "wallet_type": "hot",
        "network": "ethereum",
        "is_default": true,
        "is_active": true
      },
      "balances": [
        {
          "id": "dd9bbc6b-a3b5-4b5e-97db-e00aa8389ee1",
          "user_id": "383f20af-5960-4374-a5c3-b7566ea8f771",
          "wallet_id": "ea963c72-35d4-4a4e-8e32-70971c27f188",
          "currency": "ETH",
          "token_type": "ETH",
          "token_symbol": "ETH",
          "amount": "0.00000000",
          "usd_value": "0.00",
          "locked_amount": "0.00000000",
          "last_price_usd": "0.00"
        },
        {
          "id": "309e195d-6b6b-4a41-b793-5452f5c1ed02",
          "user_id": "383f20af-5960-4374-a5c3-b7566ea8f771",
          "wallet_id": "ea963c72-35d4-4a4e-8e32-70971c27f188",
          "currency": "USDT",
          "token_type": "USDT",
          "token_symbol": "USDT",
          "amount": "0.00000000",
          "usd_value": "0.00",
          "locked_amount": "0.00000000",
          "last_price_usd": "0.00"
        }
      ]
    },
    {
      "wallet": {
        "id": "05e36fd9-88e9-4dfb-8d8b-07493cef8e84",
        "user_id": "383f20af-5960-4374-a5c3-b7566ea8f771",
        "name": "TRON Wallet",
        "address": "TFviB3ioZTnbPJVqqWjqZJbc6zu7hkeyEc",
        "wallet_type": "hot",
        "network": "tron",
        "is_active": true
      },
      "balances": [
        {
          "id": "57bcec93-ea33-4fe3-bbd1-d9e10bad45ca",
          "user_id": "383f20af-5960-4374-a5c3-b7566ea8f771",
          "wallet_id": "05e36fd9-88e9-4dfb-8d8b-07493cef8e84",
          "currency": "TRX",
          "token_type": "TRX",
          "token_symbol": "TRX",
          "amount": "0.00000000",
          "usd_value": "0.00",
          "locked_amount": "0.00000000",
          "last_price_usd": "0.00"
        },
        {
          "id": "75ca706e-9461-489b-ad2d-03bb82043d01",
          "user_id": "383f20af-5960-4374-a5c3-b7566ea8f771",
          "wallet_id": "05e36fd9-88e9-4dfb-8d8b-07493cef8e84",
          "currency": "USDT",
          "token_type": "USDT",
          "token_symbol": "USDT",
          "amount": "0.00000000",
          "usd_value": "0.00",
          "locked_amount": "0.00000000",
          "last_price_usd": "0.00"
        }
      ]
    }
  ]
}

Body

application/json
email
string<email>
required

User's login email; must be unique.

phone_number
string
required

E.164 format phone (e.g., +2547xxxxxxx).

first_name
string
required

Given name.

last_name
string
required

Family name.

password
string<password>
required

User password (min 6 chars).

role
enum<string>
required

Role to assign.

Available options:
customer,
vendor,
user
kyc_status
enum<string>
required

Initial KYC state; usually pending.

Available options:
pending,
approved,
rejected
pin
string

Optional 6-digit numeric PIN used for PIN-based login (POST /api/v1/users/login-pin). If omitted, the user can still log in with email + password but cannot use PIN login until a PIN is set.

Pattern: ^[0-9]{6}$

Response

201 - application/json

User registered

message
string

Success message.

user
object
wallets
object[]