Roles
Lists roles for a company
Lists the roles defined for your company, each with its permission keys, permission count, and number of assigned users. Requires a Bearer token for a company user with the roles.view permission. Filter by name with search_query or by assigned-user count with min_user_count / max_user_count, and sort with sorted_by (default created_at_asc). Uses page-number pagination: page (default 1) and per_page (default 25, max 100); meta.pagination reports the page counts and meta.count the number of matching roles.
GET
/
api
/
company
/
roles
Lists roles for a company
curl --request GET \
--url https://api.fluid.app/api/company/roles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/company/roles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/company/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/company/roles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/company/roles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fluid.app/api/company/roles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"roles": [
{
"id": 3187,
"name": "Customer Support",
"createdAt": "2026-09-14T15:42:08.311Z",
"user_count": 3,
"permission_keys": [
"orders.view",
"orders.update",
"refunds.view",
"refunds.create",
"subscriptions.view",
"subscriptions.update"
],
"permissions_count": 6
},
{
"id": 3192,
"name": "Warehouse Team",
"createdAt": "2026-09-18T09:17:44.052Z",
"user_count": 2,
"permission_keys": [
"orders.view",
"fulfillments.view",
"fulfillments.create",
"inventory.view",
"inventory.update"
],
"permissions_count": 5
}
],
"meta": {
"request_id": "5f0c2b9e-3d41-4a7e-9b12-6e8d4c0a7f31",
"timestamp": "2026-09-30T14:05:12Z",
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_count": 2,
"per_page": 25
},
"count": 2
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}Query Parameters
⌘I
Lists roles for a company
curl --request GET \
--url https://api.fluid.app/api/company/roles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/company/roles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/company/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/company/roles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/company/roles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fluid.app/api/company/roles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"roles": [
{
"id": 3187,
"name": "Customer Support",
"createdAt": "2026-09-14T15:42:08.311Z",
"user_count": 3,
"permission_keys": [
"orders.view",
"orders.update",
"refunds.view",
"refunds.create",
"subscriptions.view",
"subscriptions.update"
],
"permissions_count": 6
},
{
"id": 3192,
"name": "Warehouse Team",
"createdAt": "2026-09-18T09:17:44.052Z",
"user_count": 2,
"permission_keys": [
"orders.view",
"fulfillments.view",
"fulfillments.create",
"inventory.view",
"inventory.update"
],
"permissions_count": 5
}
],
"meta": {
"request_id": "5f0c2b9e-3d41-4a7e-9b12-6e8d4c0a7f31",
"timestamp": "2026-09-30T14:05:12Z",
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_count": 2,
"per_page": 25
},
"count": 2
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}