Usuários
Recuperar um usuário
Retorna os detalhes do usuário solicitado dentro do escopo de uma organização.
GET
/
v1
/
organizations
/
{organization_id}
/
users
/
{user_id}
Recuperar um usuário
curl --request GET \
--url https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_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/v1/organizations/{organization_id}/users/{user_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/v1/organizations/{organization_id}/users/{user_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/v1/organizations/{organization_id}/users/{user_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/v1/organizations/{organization_id}/users/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_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": "64f0c2a1b2d3e4f506070801",
"organization_id": "507f1f77bcf86cd799439011",
"name": "Ana",
"surname": "Lopez",
"email": "[email protected]",
"language": "en-EN",
"created_at": "2025-12-01T10:30:00.000Z",
"department": "Soporte",
"role_id": "64f0c2a1b2d3e4f5060708aa",
"created_by": "64f0c2a1b2d3e4f5060708bb",
"email_login_enabled": true
}{
"error": {
"message": "Formato de user_id no valido",
"code": "bad_request",
"details": "user_id debe ser una cadena hexadecimal en minusculas de 24 caracteres"
}
}{
"error": {
"message": "No autorizado",
"code": "unauthorized"
}
}{
"error": {
"message": "Usuario no encontrado",
"code": "not_found"
}
}{
"error": {
"message": "Error interno del servidor",
"code": "internal_error"
}
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parâmetros de caminho
Identificador da organização.
Required string length:
24Pattern:
^[0-9a-f]{24}$Identificador do usuário.
Required string length:
24Pattern:
^[0-9a-f]{24}$Resposta
Detalhes do usuário recuperados com sucesso.
Identificador do usuário.
Required string length:
24Pattern:
^[0-9a-f]{24}$Nome do usuário.
Sobrenome do usuário.
Endereço de e-mail do usuário.
Código de idioma preferido para o usuário.
Opções disponíveis:
en-EN, es-ES, pt-BR, ca-ES, eu-ES Data de criação em formato ISO 8601.
Identificador da organização associada ao usuário.
Required string length:
24Pattern:
^[0-9a-f]{24}$Departamento do usuário.
Identificador do papel atribuído ao usuário.
Required string length:
24Pattern:
^[0-9a-f]{24}$Identificador do usuário que criou o registro do usuário.
Required string length:
24Pattern:
^[0-9a-f]{24}$Indica se o login por e-mail está habilitado para o usuário.
⌘I
Recuperar um usuário
curl --request GET \
--url https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_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/v1/organizations/{organization_id}/users/{user_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/v1/organizations/{organization_id}/users/{user_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/v1/organizations/{organization_id}/users/{user_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/v1/organizations/{organization_id}/users/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_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": "64f0c2a1b2d3e4f506070801",
"organization_id": "507f1f77bcf86cd799439011",
"name": "Ana",
"surname": "Lopez",
"email": "[email protected]",
"language": "en-EN",
"created_at": "2025-12-01T10:30:00.000Z",
"department": "Soporte",
"role_id": "64f0c2a1b2d3e4f5060708aa",
"created_by": "64f0c2a1b2d3e4f5060708bb",
"email_login_enabled": true
}{
"error": {
"message": "Formato de user_id no valido",
"code": "bad_request",
"details": "user_id debe ser una cadena hexadecimal en minusculas de 24 caracteres"
}
}{
"error": {
"message": "No autorizado",
"code": "unauthorized"
}
}{
"error": {
"message": "Usuario no encontrado",
"code": "not_found"
}
}{
"error": {
"message": "Error interno del servidor",
"code": "internal_error"
}
}