Permissions
Update User Account Group Permissions
Adds or updates account group permissions for a user without removing existing ones
PATCH
/
organizations
/
users
/
{user_id}
/
account-group-permissions
Update User Account Group Permissions
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions \
--header 'Content-Type: application/json' \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>' \
--data '
{
"account_group_permissions": [
{
"account_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_id": "<string>"
}
]
}
'import requests
url = "https://api-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions"
payload = { "account_group_permissions": [
{
"account_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_id": "<string>"
}
] }
headers = {
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'PUBLIC-API-KEY': '<api-key>',
'PRIVATE-SECRET-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_group_permissions: [
{account_group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', role_id: '<string>'}
]
})
};
fetch('https://api-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions', 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-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions",
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([
'account_group_permissions' => [
[
'account_group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'role_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-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-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions"
payload := strings.NewReader("{\n \"account_group_permissions\": [\n {\n \"account_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("PUBLIC-API-KEY", "<api-key>")
req.Header.Add("PRIVATE-SECRET-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-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_group_permissions\": [\n {\n \"account_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_group_permissions\": [\n {\n \"account_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"permissions": [
{
"account_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_group_name": "<string>",
"role_id": "<string>",
"role_name": "<string>",
"accounts_count": 123
}
]
}Partially updates account group permissions. Adds or updates without removing existing ones.
Authorizations
Path Parameters
User UUID.
Body
application/json
Show child attributes
Show child attributes
Response
200 - application/json
OK
Show child attributes
Show child attributes
Was this page helpful?
Previous
Delete User Account Group PermissionRemoves a specific account group permission assigned to a user
Next
⌘I
Update User Account Group Permissions
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions \
--header 'Content-Type: application/json' \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>' \
--data '
{
"account_group_permissions": [
{
"account_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_id": "<string>"
}
]
}
'import requests
url = "https://api-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions"
payload = { "account_group_permissions": [
{
"account_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_id": "<string>"
}
] }
headers = {
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'PUBLIC-API-KEY': '<api-key>',
'PRIVATE-SECRET-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_group_permissions: [
{account_group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', role_id: '<string>'}
]
})
};
fetch('https://api-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions', 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-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions",
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([
'account_group_permissions' => [
[
'account_group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'role_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-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-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions"
payload := strings.NewReader("{\n \"account_group_permissions\": [\n {\n \"account_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("PUBLIC-API-KEY", "<api-key>")
req.Header.Add("PRIVATE-SECRET-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-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_group_permissions\": [\n {\n \"account_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/organizations/users/{user_id}/account-group-permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_group_permissions\": [\n {\n \"account_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"permissions": [
{
"account_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_group_name": "<string>",
"role_id": "<string>",
"role_name": "<string>",
"accounts_count": 123
}
]
}