Roles
Retrieve a role
Returns details of the requested role within the scope of an organization.
GET
/
v2
/
organizations
/
{organization_id}
/
roles
/
{role_id}
Retrieve a role
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_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://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}",
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.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}"
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.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}")
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{
"id": "64f0c2a1b2d3e4f5060708aa",
"name": "Administrador de la organización",
"organization_id": "507f1f77bcf86cd799439011",
"created_at": "2026-03-12T10:30:00Z",
"created_by": "64f0c2a1b2d3e4f5060708bb",
"permissions": [
{
"portal_permission": "organization_admin",
"workspaces_permission": "admin",
"analyzer_permission": "access",
"target_organization": "all",
"target_reporting_groups": [
"64f0c2a1b2d3e4f5060708c1",
"64f0c2a1b2d3e4f5060708c2"
]
}
]
}{
"error": {
"message": "Formato de role_id no válido",
"code": "bad_request",
"details": "role_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
}
}{
"error": {
"message": "No autorizado",
"code": "unauthorized"
}
}{
"error": {
"message": "Rol no encontrado",
"code": "not_found"
}
}{
"error": {
"message": "Error interno del servidor",
"code": "internal_error"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$Role identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$Response
User role details retrieved successfully.
Role identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$Role name.
Organization identifier associated with this role.
Required string length:
24Pattern:
^[0-9a-f]{24}$Role creation timestamp in ISO 8601 format.
Identifier of the user who created the role.
Required string length:
24Pattern:
^[0-9a-f]{24}$Permission entries configured for this role.
Show child attributes
Show child attributes
⌘I
Retrieve a role
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_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://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}",
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.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}"
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.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/roles/{role_id}")
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{
"id": "64f0c2a1b2d3e4f5060708aa",
"name": "Administrador de la organización",
"organization_id": "507f1f77bcf86cd799439011",
"created_at": "2026-03-12T10:30:00Z",
"created_by": "64f0c2a1b2d3e4f5060708bb",
"permissions": [
{
"portal_permission": "organization_admin",
"workspaces_permission": "admin",
"analyzer_permission": "access",
"target_organization": "all",
"target_reporting_groups": [
"64f0c2a1b2d3e4f5060708c1",
"64f0c2a1b2d3e4f5060708c2"
]
}
]
}{
"error": {
"message": "Formato de role_id no válido",
"code": "bad_request",
"details": "role_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
}
}{
"error": {
"message": "No autorizado",
"code": "unauthorized"
}
}{
"error": {
"message": "Rol no encontrado",
"code": "not_found"
}
}{
"error": {
"message": "Error interno del servidor",
"code": "internal_error"
}
}