curl --request PATCH \
--url https://api.eu.bronto.io/users/{userId} \
--header 'Content-Type: application/json' \
--header 'X-BRONTO-API-KEY: <api-key>' \
--data '
{
"first_name": "Alice",
"last_name": "Smith",
"roles": [
"Admin",
"Standard",
"ReadOnly"
],
"login_methods": {}
}
'import requests
url = "https://api.eu.bronto.io/users/{userId}"
payload = {
"first_name": "Alice",
"last_name": "Smith",
"roles": ["Admin", "Standard", "ReadOnly"],
"login_methods": {}
}
headers = {
"X-BRONTO-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-BRONTO-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Alice',
last_name: 'Smith',
roles: ['Admin', 'Standard', 'ReadOnly'],
login_methods: {}
})
};
fetch('https://api.eu.bronto.io/users/{userId}', 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.eu.bronto.io/users/{userId}",
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([
'first_name' => 'Alice',
'last_name' => 'Smith',
'roles' => [
'Admin',
'Standard',
'ReadOnly'
],
'login_methods' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BRONTO-API-KEY: <api-key>"
],
]);
$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.eu.bronto.io/users/{userId}"
payload := strings.NewReader("{\n \"first_name\": \"Alice\",\n \"last_name\": \"Smith\",\n \"roles\": [\n \"Admin\",\n \"Standard\",\n \"ReadOnly\"\n ],\n \"login_methods\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-BRONTO-API-KEY", "<api-key>")
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.eu.bronto.io/users/{userId}")
.header("X-BRONTO-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Alice\",\n \"last_name\": \"Smith\",\n \"roles\": [\n \"Admin\",\n \"Standard\",\n \"ReadOnly\"\n ],\n \"login_methods\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.bronto.io/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-BRONTO-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Alice\",\n \"last_name\": \"Smith\",\n \"roles\": [\n \"Admin\",\n \"Standard\",\n \"ReadOnly\"\n ],\n \"login_methods\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "John",
"last_name": "Doe",
"email": "john@company.com",
"roles": [
"ReadOnly",
"Standard"
],
"last_logins": {
"Okta": 1731370728,
"Password": 1731338939
},
"login_methods": [
{
"name": "Password",
"enabled": true
}
],
"tags": {
"region": "eu",
"environment": "production"
},
"status": "INVITED",
"invited_at": 1731370728,
"invited_by": "admin@company.com"
}{
"code": 400,
"type": "Bad Request",
"correlation_id": "95c6a974e3ab01209b6b0dfedb1b16c5",
"details": "Validation failed: 'name' field is required and cannot be empty"
}{
"code": 404,
"type": "Not Found",
"correlation_id": "605f832bcfe44a1081441691c8d42253",
"details": "Resource not found."
}{
"code": 429,
"type": "Too Many Requests",
"correlation_id": "53909ed43c544531b7a555e295960437",
"details": "Rate limit exceeded. Maximum 100 requests are allowed within a 5-minute window."
}{
"code": 500,
"type": "Internal Server Error",
"correlation_id": "b129b8e0e66c41aa9541a30f67e38ce2",
"details": "Internal Server Error"
}{
"code": 500,
"type": "Internal Server Error",
"correlation_id": "b129b8e0e66c41aa9541a30f67e38ce2",
"details": "Internal Server Error"
}Update a user
Updates the specified user’s information. Only the fields provided in the request body will be modified; other fields will remain unchanged. Users can typically update their own profiles, while administrators may update any user.
curl --request PATCH \
--url https://api.eu.bronto.io/users/{userId} \
--header 'Content-Type: application/json' \
--header 'X-BRONTO-API-KEY: <api-key>' \
--data '
{
"first_name": "Alice",
"last_name": "Smith",
"roles": [
"Admin",
"Standard",
"ReadOnly"
],
"login_methods": {}
}
'import requests
url = "https://api.eu.bronto.io/users/{userId}"
payload = {
"first_name": "Alice",
"last_name": "Smith",
"roles": ["Admin", "Standard", "ReadOnly"],
"login_methods": {}
}
headers = {
"X-BRONTO-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-BRONTO-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Alice',
last_name: 'Smith',
roles: ['Admin', 'Standard', 'ReadOnly'],
login_methods: {}
})
};
fetch('https://api.eu.bronto.io/users/{userId}', 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.eu.bronto.io/users/{userId}",
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([
'first_name' => 'Alice',
'last_name' => 'Smith',
'roles' => [
'Admin',
'Standard',
'ReadOnly'
],
'login_methods' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BRONTO-API-KEY: <api-key>"
],
]);
$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.eu.bronto.io/users/{userId}"
payload := strings.NewReader("{\n \"first_name\": \"Alice\",\n \"last_name\": \"Smith\",\n \"roles\": [\n \"Admin\",\n \"Standard\",\n \"ReadOnly\"\n ],\n \"login_methods\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-BRONTO-API-KEY", "<api-key>")
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.eu.bronto.io/users/{userId}")
.header("X-BRONTO-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Alice\",\n \"last_name\": \"Smith\",\n \"roles\": [\n \"Admin\",\n \"Standard\",\n \"ReadOnly\"\n ],\n \"login_methods\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.bronto.io/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-BRONTO-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Alice\",\n \"last_name\": \"Smith\",\n \"roles\": [\n \"Admin\",\n \"Standard\",\n \"ReadOnly\"\n ],\n \"login_methods\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "John",
"last_name": "Doe",
"email": "john@company.com",
"roles": [
"ReadOnly",
"Standard"
],
"last_logins": {
"Okta": 1731370728,
"Password": 1731338939
},
"login_methods": [
{
"name": "Password",
"enabled": true
}
],
"tags": {
"region": "eu",
"environment": "production"
},
"status": "INVITED",
"invited_at": 1731370728,
"invited_by": "admin@company.com"
}{
"code": 400,
"type": "Bad Request",
"correlation_id": "95c6a974e3ab01209b6b0dfedb1b16c5",
"details": "Validation failed: 'name' field is required and cannot be empty"
}{
"code": 404,
"type": "Not Found",
"correlation_id": "605f832bcfe44a1081441691c8d42253",
"details": "Resource not found."
}{
"code": 429,
"type": "Too Many Requests",
"correlation_id": "53909ed43c544531b7a555e295960437",
"details": "Rate limit exceeded. Maximum 100 requests are allowed within a 5-minute window."
}{
"code": 500,
"type": "Internal Server Error",
"correlation_id": "b129b8e0e66c41aa9541a30f67e38ce2",
"details": "Internal Server Error"
}{
"code": 500,
"type": "Internal Server Error",
"correlation_id": "b129b8e0e66c41aa9541a30f67e38ce2",
"details": "Internal Server Error"
}Authorizations
Path Parameters
The unique identifier of the user to update
Body
Response
User updated successfully
The unique identifier for the user
The user's first name
"John"
The user's last name
"Doe"
The user's email address
"john@company.com"
A list of role ids
["ReadOnly", "Standard"]
A map of login methods to their last login timestamps (Unix epoch).
Show child attributes
Show child attributes
{
"Okta": 1731370728,
"Password": 1731338939
}
Show child attributes
Show child attributes
A map of key value pairs associated with the resource
Show child attributes
Show child attributes
{
"region": "eu",
"environment": "production"
}
Current status of the user
INVITED, ACTIVE, INACTIVE, DEACTIVATED, MIGRATED, REMOVED Unix timestamp (seconds) of the last invitation sent to the user
1731370728
Identifier for the user who sent the latest invitation
"admin@company.com"
