Update User By ID
curl --request PUT \
--url https://crypto.westminister.tech/api/v1/auth/user/id/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "michael.ochieng@gmail.com",
"phone_number": "+254708374149",
"first_name": "Michael",
"last_name": "Juma"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/user/id/{id}"
payload = {
"email": "michael.ochieng@gmail.com",
"phone_number": "+254708374149",
"first_name": "Michael",
"last_name": "Juma"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'michael.ochieng@gmail.com',
phone_number: '+254708374149',
first_name: 'Michael',
last_name: 'Juma'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/user/id/{id}', 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/user/id/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'michael.ochieng@gmail.com',
'phone_number' => '+254708374149',
'first_name' => 'Michael',
'last_name' => 'Juma'
]),
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/user/id/{id}"
payload := strings.NewReader("{\n \"email\": \"michael.ochieng@gmail.com\",\n \"phone_number\": \"+254708374149\",\n \"first_name\": \"Michael\",\n \"last_name\": \"Juma\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://crypto.westminister.tech/api/v1/auth/user/id/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"michael.ochieng@gmail.com\",\n \"phone_number\": \"+254708374149\",\n \"first_name\": \"Michael\",\n \"last_name\": \"Juma\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/user/id/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"michael.ochieng@gmail.com\",\n \"phone_number\": \"+254708374149\",\n \"first_name\": \"Michael\",\n \"last_name\": \"Juma\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8d09359f-325a-4ecf-998d-dbe5eda3a498",
"email": "michael.ochieng@gmail.com",
"phone_number": "+254708374149",
"first_name": "Michael",
"last_name": "Juma",
"role": "customer",
"kyc_status": "pending"
}Wallets-Users
Update User By ID
Updates user email, phone_number, first_name, last_name fields for the specified user ID.
PUT
/
api
/
v1
/
auth
/
user
/
id
/
{id}
Update User By ID
curl --request PUT \
--url https://crypto.westminister.tech/api/v1/auth/user/id/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "michael.ochieng@gmail.com",
"phone_number": "+254708374149",
"first_name": "Michael",
"last_name": "Juma"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/user/id/{id}"
payload = {
"email": "michael.ochieng@gmail.com",
"phone_number": "+254708374149",
"first_name": "Michael",
"last_name": "Juma"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'michael.ochieng@gmail.com',
phone_number: '+254708374149',
first_name: 'Michael',
last_name: 'Juma'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/user/id/{id}', 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/user/id/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'michael.ochieng@gmail.com',
'phone_number' => '+254708374149',
'first_name' => 'Michael',
'last_name' => 'Juma'
]),
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/user/id/{id}"
payload := strings.NewReader("{\n \"email\": \"michael.ochieng@gmail.com\",\n \"phone_number\": \"+254708374149\",\n \"first_name\": \"Michael\",\n \"last_name\": \"Juma\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://crypto.westminister.tech/api/v1/auth/user/id/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"michael.ochieng@gmail.com\",\n \"phone_number\": \"+254708374149\",\n \"first_name\": \"Michael\",\n \"last_name\": \"Juma\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/user/id/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"michael.ochieng@gmail.com\",\n \"phone_number\": \"+254708374149\",\n \"first_name\": \"Michael\",\n \"last_name\": \"Juma\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8d09359f-325a-4ecf-998d-dbe5eda3a498",
"email": "michael.ochieng@gmail.com",
"phone_number": "+254708374149",
"first_name": "Michael",
"last_name": "Juma",
"role": "customer",
"kyc_status": "pending"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
User ID (UUID).
Body
application/json
Response
200 - application/json
User updated
User ID.
User email.
Phone in E.164 format.
Given name.
Family name.
Assigned role. Admin can only be assigned via PUT /api/v1/auth/user/id/{id}/role by an existing admin.
Available options:
customer, vendor, subvendor, user, admin Current KYC status.
⌘I