Update User
curl --request PATCH \
--url https://{instance}.domo.com/users/{id} \
--header 'Content-Type: application/json' \
--header 'X-DOMO-Developer-Token: <api-key>' \
--data '{
"roleId": 5
}'import requests
url = "https://{instance}.domo.com/users/{id}"
payload = { "roleId": 5 }
headers = {
"X-DOMO-Developer-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-DOMO-Developer-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({roleId: 5})
};
fetch('https://{instance}.domo.com/users/{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://{instance}.domo.com/users/{id}",
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([
'roleId' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-DOMO-Developer-Token: <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://{instance}.domo.com/users/{id}"
payload := strings.NewReader("{\n \"roleId\": 5\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-DOMO-Developer-Token", "<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://{instance}.domo.com/users/{id}")
.header("X-DOMO-Developer-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"roleId\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.domo.com/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-DOMO-Developer-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"roleId\": 5\n}"
response = http.request(request)
puts response.read_body{
"id": 123456,
"displayName": "John Doe",
"userName": "john.doe@example.com",
"emailAddress": "john.doe@example.com",
"roleId": 1,
"attributes": [
{
"key": "department",
"values": [
"Engineering",
"Product"
]
}
]
}User API
Update User
Updates an existing user’s information
PATCH
/
users
/
{id}
Update User
curl --request PATCH \
--url https://{instance}.domo.com/users/{id} \
--header 'Content-Type: application/json' \
--header 'X-DOMO-Developer-Token: <api-key>' \
--data '{
"roleId": 5
}'import requests
url = "https://{instance}.domo.com/users/{id}"
payload = { "roleId": 5 }
headers = {
"X-DOMO-Developer-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-DOMO-Developer-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({roleId: 5})
};
fetch('https://{instance}.domo.com/users/{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://{instance}.domo.com/users/{id}",
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([
'roleId' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-DOMO-Developer-Token: <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://{instance}.domo.com/users/{id}"
payload := strings.NewReader("{\n \"roleId\": 5\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-DOMO-Developer-Token", "<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://{instance}.domo.com/users/{id}")
.header("X-DOMO-Developer-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"roleId\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.domo.com/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-DOMO-Developer-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"roleId\": 5\n}"
response = http.request(request)
puts response.read_body{
"id": 123456,
"displayName": "John Doe",
"userName": "john.doe@example.com",
"emailAddress": "john.doe@example.com",
"roleId": 1,
"attributes": [
{
"key": "department",
"values": [
"Engineering",
"Product"
]
}
]
}Authorizations
Domo Developer Token for authentication
Path Parameters
Id of the user requested
Body
application/json
Response
User updated successfully
Unique identifier for the user
Example:
123456
Display name of the user
Example:
"John Doe"
Username of the user
Example:
"john.doe@example.com"
Email address of the user
Example:
"john.doe@example.com"
Role ID assigned to the user
Example:
1
Custom attributes associated with the user
Show child attributes
Show child attributes
⌘I