Users
Update a user
Fully updates the user’s editable data in the organization.
PUT
/
v1
/
organizations
/
{organization_id}
/
users
/
{user_id}
Update a user
curl --request PUT \
--url https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Ana",
"surname": "Lopez",
"email": "[email protected]",
"department": "Support",
"role_id": "64f0c2a1b2d3e4f5060708aa"
}
'import requests
url = "https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_id}"
payload = {
"name": "Ana",
"surname": "Lopez",
"email": "[email protected]",
"department": "Support",
"role_id": "64f0c2a1b2d3e4f5060708aa"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Ana',
surname: 'Lopez',
email: '[email protected]',
department: 'Support',
role_id: '64f0c2a1b2d3e4f5060708aa'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Ana',
'surname' => 'Lopez',
'email' => '[email protected]',
'department' => 'Support',
'role_id' => '64f0c2a1b2d3e4f5060708aa'
]),
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.flexxible.net/v1/organizations/{organization_id}/users/{user_id}"
payload := strings.NewReader("{\n \"name\": \"Ana\",\n \"surname\": \"Lopez\",\n \"email\": \"[email protected]\",\n \"department\": \"Support\",\n \"role_id\": \"64f0c2a1b2d3e4f5060708aa\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Ana\",\n \"surname\": \"Lopez\",\n \"email\": \"[email protected]\",\n \"department\": \"Support\",\n \"role_id\": \"64f0c2a1b2d3e4f5060708aa\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Ana\",\n \"surname\": \"Lopez\",\n \"email\": \"[email protected]\",\n \"department\": \"Support\",\n \"role_id\": \"64f0c2a1b2d3e4f5060708aa\"\n}"
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": "2026-06-22T16:00:00.000Z",
"department": "Support",
"role_id": "64f0c2a1b2d3e4f5060708aa",
"created_by": "64f0c2a1b2d3e4f5060708bb",
"email_login_enabled": false
}{
"error": {
"message": "Cuerpo de solicitud inválido",
"code": "bad_request",
"details": "el parámetro de ruta user_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
}
}{
"error": {
"message": "No autorizado",
"code": "unauthorized"
}
}{
"error": {
"message": "Usuario no encontrado",
"code": "not_found"
}
}{
"error": {
"message": "El correo electrónico ya existe",
"code": "conflict",
"details": "el correo electrónico ya está registrado para otro usuario"
}
}{
"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}$User ID to update
Required string length:
24Pattern:
^[0-9a-f]{24}$Body
application/json
User's name.
Required string length:
1 - 120User's surname.
Required string length:
1 - 120User's email address.
User's department.
Identifier of the role assigned to the user.
Required string length:
24Pattern:
^[0-9a-f]{24}$Response
User updated successfully.
User identifier.
Required string length:
24Pattern:
^[0-9a-f]{24}$User's name.
User's surname.
User's email address.
User's preferred language code.
Available options:
en-EN, es-ES, pt-BR, ca-ES, eu-ES Creation date in ISO 8601 format.
Organization identifier associated with the user.
Required string length:
24Pattern:
^[0-9a-f]{24}$User's department.
Identifier of the role assigned to the user.
Required string length:
24Pattern:
^[0-9a-f]{24}$Identifier of the user who created the user record.
Required string length:
24Pattern:
^[0-9a-f]{24}$Indicates if email login is enabled for the user.
⌘I
Update a user
curl --request PUT \
--url https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Ana",
"surname": "Lopez",
"email": "[email protected]",
"department": "Support",
"role_id": "64f0c2a1b2d3e4f5060708aa"
}
'import requests
url = "https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_id}"
payload = {
"name": "Ana",
"surname": "Lopez",
"email": "[email protected]",
"department": "Support",
"role_id": "64f0c2a1b2d3e4f5060708aa"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Ana',
surname: 'Lopez',
email: '[email protected]',
department: 'Support',
role_id: '64f0c2a1b2d3e4f5060708aa'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Ana',
'surname' => 'Lopez',
'email' => '[email protected]',
'department' => 'Support',
'role_id' => '64f0c2a1b2d3e4f5060708aa'
]),
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.flexxible.net/v1/organizations/{organization_id}/users/{user_id}"
payload := strings.NewReader("{\n \"name\": \"Ana\",\n \"surname\": \"Lopez\",\n \"email\": \"[email protected]\",\n \"department\": \"Support\",\n \"role_id\": \"64f0c2a1b2d3e4f5060708aa\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.flexxible.net/v1/organizations/{organization_id}/users/{user_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Ana\",\n \"surname\": \"Lopez\",\n \"email\": \"[email protected]\",\n \"department\": \"Support\",\n \"role_id\": \"64f0c2a1b2d3e4f5060708aa\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Ana\",\n \"surname\": \"Lopez\",\n \"email\": \"[email protected]\",\n \"department\": \"Support\",\n \"role_id\": \"64f0c2a1b2d3e4f5060708aa\"\n}"
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": "2026-06-22T16:00:00.000Z",
"department": "Support",
"role_id": "64f0c2a1b2d3e4f5060708aa",
"created_by": "64f0c2a1b2d3e4f5060708bb",
"email_login_enabled": false
}{
"error": {
"message": "Cuerpo de solicitud inválido",
"code": "bad_request",
"details": "el parámetro de ruta user_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
}
}{
"error": {
"message": "No autorizado",
"code": "unauthorized"
}
}{
"error": {
"message": "Usuario no encontrado",
"code": "not_found"
}
}{
"error": {
"message": "El correo electrónico ya existe",
"code": "conflict",
"details": "el correo electrónico ya está registrado para otro usuario"
}
}{
"error": {
"message": "Error interno del servidor",
"code": "internal_error"
}
}