curl --request PUT \
--url https://pria.praxislxp.com/api/admin/user/{userId} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"email": "jsmith@example.com",
"fname": "<string>",
"lname": "<string>",
"status": "<string>",
"plan": "<string>",
"credits": 123,
"accountType": "<string>",
"institution": "<string>",
"password": "<string>",
"mustChangePassword": true,
"mfaEnabled": true
}
'import requests
url = "https://pria.praxislxp.com/api/admin/user/{userId}"
payload = {
"email": "jsmith@example.com",
"fname": "<string>",
"lname": "<string>",
"status": "<string>",
"plan": "<string>",
"credits": 123,
"accountType": "<string>",
"institution": "<string>",
"password": "<string>",
"mustChangePassword": True,
"mfaEnabled": True
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
fname: '<string>',
lname: '<string>',
status: '<string>',
plan: '<string>',
credits: 123,
accountType: '<string>',
institution: '<string>',
password: '<string>',
mustChangePassword: true,
mfaEnabled: true
})
};
fetch('https://pria.praxislxp.com/api/admin/user/{userId}', 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://pria.praxislxp.com/api/admin/user/{userId}",
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' => 'jsmith@example.com',
'fname' => '<string>',
'lname' => '<string>',
'status' => '<string>',
'plan' => '<string>',
'credits' => 123,
'accountType' => '<string>',
'institution' => '<string>',
'password' => '<string>',
'mustChangePassword' => true,
'mfaEnabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://pria.praxislxp.com/api/admin/user/{userId}"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"status\": \"<string>\",\n \"plan\": \"<string>\",\n \"credits\": 123,\n \"accountType\": \"<string>\",\n \"institution\": \"<string>\",\n \"password\": \"<string>\",\n \"mustChangePassword\": true,\n \"mfaEnabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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://pria.praxislxp.com/api/admin/user/{userId}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"status\": \"<string>\",\n \"plan\": \"<string>\",\n \"credits\": 123,\n \"accountType\": \"<string>\",\n \"institution\": \"<string>\",\n \"password\": \"<string>\",\n \"mustChangePassword\": true,\n \"mfaEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/admin/user/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"status\": \"<string>\",\n \"plan\": \"<string>\",\n \"credits\": 123,\n \"accountType\": \"<string>\",\n \"institution\": \"<string>\",\n \"password\": \"<string>\",\n \"mustChangePassword\": true,\n \"mfaEnabled\": true\n}"
response = http.request(request)
puts response.read_bodyEdit a user (Admin only)
Edits an existing account; this is the Users edit page. On an existing account, credits, plan, current twin (institution, applied together with plan ‘sdk’), names, password and MFA change only here; status also changes through the bulk status endpoint and DELETE. Requires users.edit on the account’s current twin (on your own twin when the account has none), and on institution whenever it names a different twin. Only a super admin can edit a super admin or assign the super role, and a new accountType must be user, admin or super. Setting status to ‘deleted’ deletes the user and needs users.delete.
curl --request PUT \
--url https://pria.praxislxp.com/api/admin/user/{userId} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"email": "jsmith@example.com",
"fname": "<string>",
"lname": "<string>",
"status": "<string>",
"plan": "<string>",
"credits": 123,
"accountType": "<string>",
"institution": "<string>",
"password": "<string>",
"mustChangePassword": true,
"mfaEnabled": true
}
'import requests
url = "https://pria.praxislxp.com/api/admin/user/{userId}"
payload = {
"email": "jsmith@example.com",
"fname": "<string>",
"lname": "<string>",
"status": "<string>",
"plan": "<string>",
"credits": 123,
"accountType": "<string>",
"institution": "<string>",
"password": "<string>",
"mustChangePassword": True,
"mfaEnabled": True
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
fname: '<string>',
lname: '<string>',
status: '<string>',
plan: '<string>',
credits: 123,
accountType: '<string>',
institution: '<string>',
password: '<string>',
mustChangePassword: true,
mfaEnabled: true
})
};
fetch('https://pria.praxislxp.com/api/admin/user/{userId}', 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://pria.praxislxp.com/api/admin/user/{userId}",
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' => 'jsmith@example.com',
'fname' => '<string>',
'lname' => '<string>',
'status' => '<string>',
'plan' => '<string>',
'credits' => 123,
'accountType' => '<string>',
'institution' => '<string>',
'password' => '<string>',
'mustChangePassword' => true,
'mfaEnabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://pria.praxislxp.com/api/admin/user/{userId}"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"status\": \"<string>\",\n \"plan\": \"<string>\",\n \"credits\": 123,\n \"accountType\": \"<string>\",\n \"institution\": \"<string>\",\n \"password\": \"<string>\",\n \"mustChangePassword\": true,\n \"mfaEnabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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://pria.praxislxp.com/api/admin/user/{userId}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"status\": \"<string>\",\n \"plan\": \"<string>\",\n \"credits\": 123,\n \"accountType\": \"<string>\",\n \"institution\": \"<string>\",\n \"password\": \"<string>\",\n \"mustChangePassword\": true,\n \"mfaEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/admin/user/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"fname\": \"<string>\",\n \"lname\": \"<string>\",\n \"status\": \"<string>\",\n \"plan\": \"<string>\",\n \"credits\": 123,\n \"accountType\": \"<string>\",\n \"institution\": \"<string>\",\n \"password\": \"<string>\",\n \"mustChangePassword\": true,\n \"mfaEnabled\": true\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
JWT token passed in x-access-token header
Path Parameters
The user ID to edit
^[0-9a-fA-F]{24}$Body
active, inactive or trialing; 'deleted' deletes the user
sdk places the account on institution; any other plan (free, entry, premium, pro, monthly) clears its current twin
user, admin or super
Digital twin _id; applied only together with plan 'sdk'
Response
User updated
Was this page helpful?