Update a user
import requests
url = "https://{FUSION_HOST}/api/users/{id}"
payload = {
"username": "1new-user-test",
"realmName": "native",
"timezone": "Pacific Time (US & Canada)",
"permissions": [{ "methods": ["GET", "PUT"] }]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.put("https://{FUSION_HOST}/api/users/{id}")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"1new-user-test\",\n \"realmName\": \"native\",\n \"timezone\": \"Pacific Time (US & Canada)\",\n \"permissions\": [\n {\n \"methods\": [\n \"GET\",\n \"PUT\"\n ]\n }\n ]\n}")
.asString();const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
username: '1new-user-test',
realmName: 'native',
timezone: 'Pacific Time (US & Canada)',
permissions: [{methods: ['GET', 'PUT']}]
})
};
fetch('https://{FUSION_HOST}/api/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION_HOST}/api/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"1new-user-test\",\n \"realmName\": \"native\",\n \"timezone\": \"Pacific Time (US & Canada)\",\n \"permissions\": [\n {\n \"methods\": [\n \"GET\",\n \"PUT\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/users/{id}"
payload := strings.NewReader("{\n \"username\": \"1new-user-test\",\n \"realmName\": \"native\",\n \"timezone\": \"Pacific Time (US & Canada)\",\n \"permissions\": [\n {\n \"methods\": [\n \"GET\",\n \"PUT\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION_HOST}/api/users/{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([
'username' => '1new-user-test',
'realmName' => 'native',
'timezone' => 'Pacific Time (US & Canada)',
'permissions' => [
[
'methods' => [
'GET',
'PUT'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request PUT \
--url https://{FUSION_HOST}/api/users/{id} \
--header 'Content-Type: application/json' \
--data '
{
"username": "1new-user-test",
"realmName": "native",
"timezone": "Pacific Time (US & Canada)",
"permissions": [
{
"methods": [
"GET",
"PUT"
]
}
]
}
'{
"id": "fe0885f2-8885-4c46-a3ea-8e5d0041c293",
"username": "1new-user-test",
"realmName": "native",
"createdAt": "2025-10-30T21:59:01Z",
"roleNames": [],
"timezone": "Pacific Time (US & Canada)",
"permissions": [
{
"methods": [
"PUT",
"GET"
]
}
]
}Update a user
Update a user’s configuration.
This API should only be called to manage users in the native security realm, which manages both authentication and authorization within the Fusion UI. Users from other security realms, such as LDAP or SAML, are managed directly by the Fusion auth proxy access control component. It referred to as the auth proxy because it handles both authentication and authorization for all requests to the Fusion REST API services for SSO services.
Before working with the User API to create a user, be sure the native security realm is set up and ready.
PUT
/
users
/
{id}
Update a user
import requests
url = "https://{FUSION_HOST}/api/users/{id}"
payload = {
"username": "1new-user-test",
"realmName": "native",
"timezone": "Pacific Time (US & Canada)",
"permissions": [{ "methods": ["GET", "PUT"] }]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.put("https://{FUSION_HOST}/api/users/{id}")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"1new-user-test\",\n \"realmName\": \"native\",\n \"timezone\": \"Pacific Time (US & Canada)\",\n \"permissions\": [\n {\n \"methods\": [\n \"GET\",\n \"PUT\"\n ]\n }\n ]\n}")
.asString();const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
username: '1new-user-test',
realmName: 'native',
timezone: 'Pacific Time (US & Canada)',
permissions: [{methods: ['GET', 'PUT']}]
})
};
fetch('https://{FUSION_HOST}/api/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION_HOST}/api/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"1new-user-test\",\n \"realmName\": \"native\",\n \"timezone\": \"Pacific Time (US & Canada)\",\n \"permissions\": [\n {\n \"methods\": [\n \"GET\",\n \"PUT\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/users/{id}"
payload := strings.NewReader("{\n \"username\": \"1new-user-test\",\n \"realmName\": \"native\",\n \"timezone\": \"Pacific Time (US & Canada)\",\n \"permissions\": [\n {\n \"methods\": [\n \"GET\",\n \"PUT\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION_HOST}/api/users/{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([
'username' => '1new-user-test',
'realmName' => 'native',
'timezone' => 'Pacific Time (US & Canada)',
'permissions' => [
[
'methods' => [
'GET',
'PUT'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request PUT \
--url https://{FUSION_HOST}/api/users/{id} \
--header 'Content-Type: application/json' \
--data '
{
"username": "1new-user-test",
"realmName": "native",
"timezone": "Pacific Time (US & Canada)",
"permissions": [
{
"methods": [
"GET",
"PUT"
]
}
]
}
'{
"id": "fe0885f2-8885-4c46-a3ea-8e5d0041c293",
"username": "1new-user-test",
"realmName": "native",
"createdAt": "2025-10-30T21:59:01Z",
"roleNames": [],
"timezone": "Pacific Time (US & Canada)",
"permissions": [
{
"methods": [
"PUT",
"GET"
]
}
]
}Path Parameters
Body
application/json
Response
200 - */*
OK
Was this page helpful?