Legacy (v0)
Update a user's roles
Changes a member’s role in the company to admin, rep, or user. {user_id} is the member ID or an auth token issued to the member. Requires a company admin token with permission to update roles. Returns 400 when role is missing or not one of those values, and 404 when no member matches. A user_updated webhook is sent when the role actually changes. Returns the member’s user profile.
PATCH
/
api
/
users
/
{user_id}
/
roles
Update a user's roles
curl --request PATCH \
--url https://api.fluid.app/api/users/{user_id}/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "admin"
}
'import requests
url = "https://api.fluid.app/api/users/{user_id}/roles"
payload = { "role": "admin" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'admin'})
};
fetch('https://api.fluid.app/api/users/{user_id}/roles', 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://api.fluid.app/api/users/{user_id}/roles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'role' => 'admin'
]),
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://api.fluid.app/api/users/{user_id}/roles"
payload := strings.NewReader("{\n \"role\": \"admin\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.fluid.app/api/users/{user_id}/roles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"admin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/users/{user_id}/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"role\": \"admin\"\n}"
response = http.request(request)
puts response.read_body{
"id": 20977,
"first_name": "Dwight",
"last_name": "Schrute",
"full_name": "Dwight Schrute",
"email": "dwight.schrute@dundermifflin.com",
"phone": "+15705550142",
"bio": "Assistant to the Regional Manager. Top paper salesman, Scranton branch.",
"time_zone": "America/New_York",
"image_url": "https://cdn.fluid.app/dunder-mifflin/avatars/dwight-schrute.jpg",
"role": "admin",
"affiliate_id": 48213,
"public_id": "0192f3a8-7c41-7d2e-9b6a-3f1e2d4c5b61",
"share_link": "https://dunder-mifflin.fluid.app/dwight-schrute",
"mysite_url": "https://dunder-mifflin.fluid.app/dwight-schrute",
"replicated_url": "https://shop.dundermifflin.com/dwight-schrute",
"affiliate_shop_url": "https://shop.dundermifflin.com/dwight-schrute/shop",
"total_points": 1250,
"email_signature": "Dwight Schrute\nAssistant to the Regional Manager\nDunder Mifflin Paper Company",
"recipient_id": 73305,
"dnd": "off",
"push_notifications": true,
"email_notifications": true,
"sms_notifications": false,
"unread_messages_count": 3,
"country": {
"id": 233,
"iso": "US",
"name": "United States"
},
"language": {
"id": 1,
"name": "English",
"iso": "en"
},
"companies": [
{
"id": 1405,
"name": "Dunder Mifflin Paper Company",
"fluid_shop": "dunder-mifflin.fluid.app"
}
],
"created_at": "2026-09-02T14:05:11Z"
}{
"message": "<string>"
}Response
Success
The profile of a user as seen within the current company. Only the most commonly used fields are listed; the response carries further app-specific fields.
⌘I
Update a user's roles
curl --request PATCH \
--url https://api.fluid.app/api/users/{user_id}/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "admin"
}
'import requests
url = "https://api.fluid.app/api/users/{user_id}/roles"
payload = { "role": "admin" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'admin'})
};
fetch('https://api.fluid.app/api/users/{user_id}/roles', 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://api.fluid.app/api/users/{user_id}/roles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'role' => 'admin'
]),
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://api.fluid.app/api/users/{user_id}/roles"
payload := strings.NewReader("{\n \"role\": \"admin\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.fluid.app/api/users/{user_id}/roles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"admin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/users/{user_id}/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"role\": \"admin\"\n}"
response = http.request(request)
puts response.read_body{
"id": 20977,
"first_name": "Dwight",
"last_name": "Schrute",
"full_name": "Dwight Schrute",
"email": "dwight.schrute@dundermifflin.com",
"phone": "+15705550142",
"bio": "Assistant to the Regional Manager. Top paper salesman, Scranton branch.",
"time_zone": "America/New_York",
"image_url": "https://cdn.fluid.app/dunder-mifflin/avatars/dwight-schrute.jpg",
"role": "admin",
"affiliate_id": 48213,
"public_id": "0192f3a8-7c41-7d2e-9b6a-3f1e2d4c5b61",
"share_link": "https://dunder-mifflin.fluid.app/dwight-schrute",
"mysite_url": "https://dunder-mifflin.fluid.app/dwight-schrute",
"replicated_url": "https://shop.dundermifflin.com/dwight-schrute",
"affiliate_shop_url": "https://shop.dundermifflin.com/dwight-schrute/shop",
"total_points": 1250,
"email_signature": "Dwight Schrute\nAssistant to the Regional Manager\nDunder Mifflin Paper Company",
"recipient_id": 73305,
"dnd": "off",
"push_notifications": true,
"email_notifications": true,
"sms_notifications": false,
"unread_messages_count": 3,
"country": {
"id": 233,
"iso": "US",
"name": "United States"
},
"language": {
"id": 1,
"name": "English",
"iso": "en"
},
"companies": [
{
"id": 1405,
"name": "Dunder Mifflin Paper Company",
"fluid_shop": "dunder-mifflin.fluid.app"
}
],
"created_at": "2026-09-02T14:05:11Z"
}{
"message": "<string>"
}