Provision User With Default Wallets (Admin)
curl --request POST \
--url https://crypto.westminister.tech/api/v1/auth/users/provision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"phone_number": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"password": "<string>",
"is_active": true,
"pin": "<string>",
"parent_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/users/provision"
payload = {
"email": "jsmith@example.com",
"phone_number": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"password": "<string>",
"is_active": True,
"pin": "<string>",
"parent_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
phone_number: '<string>',
first_name: '<string>',
last_name: '<string>',
password: '<string>',
is_active: true,
pin: '<string>',
parent_vendor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/users/provision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crypto.westminister.tech/api/v1/auth/users/provision",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'phone_number' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'password' => '<string>',
'is_active' => true,
'pin' => '<string>',
'parent_vendor_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://crypto.westminister.tech/api/v1/auth/users/provision"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"is_active\": true,\n \"pin\": \"<string>\",\n \"parent_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://crypto.westminister.tech/api/v1/auth/users/provision")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"is_active\": true,\n \"pin\": \"<string>\",\n \"parent_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/users/provision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"is_active\": true,\n \"pin\": \"<string>\",\n \"parent_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyUsers
Provision User With Default Wallets (Admin)
Admin-only endpoint for provisioning privileged/system users: admin, treasury, and otc_officer. Creates the user with email + password (login via POST /api/v1/users/login returns PASETO access/refresh tokens). admin and treasury receive best-effort default Ethereum, TRON, and Solana wallets. otc_officer does not (operations role). Duplicate contact guard: Before any user row or default wallet is created, email and phone_number must be unique among active users and within the request (bulk create). On conflict the API returns 409 and makes no database changes.
POST
/
api
/
v1
/
auth
/
users
/
provision
Provision User With Default Wallets (Admin)
curl --request POST \
--url https://crypto.westminister.tech/api/v1/auth/users/provision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"phone_number": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"password": "<string>",
"is_active": true,
"pin": "<string>",
"parent_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/users/provision"
payload = {
"email": "jsmith@example.com",
"phone_number": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"password": "<string>",
"is_active": True,
"pin": "<string>",
"parent_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
phone_number: '<string>',
first_name: '<string>',
last_name: '<string>',
password: '<string>',
is_active: true,
pin: '<string>',
parent_vendor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/users/provision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crypto.westminister.tech/api/v1/auth/users/provision",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'phone_number' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'password' => '<string>',
'is_active' => true,
'pin' => '<string>',
'parent_vendor_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://crypto.westminister.tech/api/v1/auth/users/provision"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"is_active\": true,\n \"pin\": \"<string>\",\n \"parent_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://crypto.westminister.tech/api/v1/auth/users/provision")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"is_active\": true,\n \"pin\": \"<string>\",\n \"parent_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/users/provision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"is_active\": true,\n \"pin\": \"<string>\",\n \"parent_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Minimum string length:
6Available options:
customer, vendor, subvendor, merchant, user, admin, treasury, otc_officer Available options:
pending, approved, rejected Required string length:
6Response
User provisioned with wallets
⌘I