Set a user's access and visibility
curl --request PATCH \
--url https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowed": true,
"profileId": "<string>",
"userHiddenToolNames": [
"<string>"
]
}
'import requests
url = "https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}"
payload = {
"allowed": True,
"profileId": "<string>",
"userHiddenToolNames": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowed: true, profileId: '<string>', userHiddenToolNames: ['<string>']})
};
fetch('https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}', 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.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}",
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([
'allowed' => true,
'profileId' => '<string>',
'userHiddenToolNames' => [
'<string>'
]
]),
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.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}"
payload := strings.NewReader("{\n \"allowed\": true,\n \"profileId\": \"<string>\",\n \"userHiddenToolNames\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowed\": true,\n \"profileId\": \"<string>\",\n \"userHiddenToolNames\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowed\": true,\n \"profileId\": \"<string>\",\n \"userHiddenToolNames\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"toolServerId": "<string>",
"userUID": "<string>",
"allowed": true,
"profileId": "<string>",
"userHiddenToolNames": [
"<string>"
],
"creationTimestampMs": 123,
"lastEditTimestampMs": 123
}MCP Gateway
Set a user’s access and visibility
Creates or updates the access row of one user. userHiddenToolNames applies on top of the assigned profile, so a single user can be given a narrower surface without a profile of their own.
PATCH
/
v1
/
tool-servers
/
{toolServerId}
/
users
/
{userUID}
Set a user's access and visibility
curl --request PATCH \
--url https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowed": true,
"profileId": "<string>",
"userHiddenToolNames": [
"<string>"
]
}
'import requests
url = "https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}"
payload = {
"allowed": True,
"profileId": "<string>",
"userHiddenToolNames": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowed: true, profileId: '<string>', userHiddenToolNames: ['<string>']})
};
fetch('https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}', 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.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}",
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([
'allowed' => true,
'profileId' => '<string>',
'userHiddenToolNames' => [
'<string>'
]
]),
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.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}"
payload := strings.NewReader("{\n \"allowed\": true,\n \"profileId\": \"<string>\",\n \"userHiddenToolNames\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowed\": true,\n \"profileId\": \"<string>\",\n \"userHiddenToolNames\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/tool-servers/{toolServerId}/users/{userUID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowed\": true,\n \"profileId\": \"<string>\",\n \"userHiddenToolNames\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"toolServerId": "<string>",
"userUID": "<string>",
"allowed": true,
"profileId": "<string>",
"userHiddenToolNames": [
"<string>"
],
"creationTimestampMs": 123,
"lastEditTimestampMs": 123
}Authorizations
Use JWT token for authentication
Path Parameters
Id of the MCP Gateway tool server
Devic user id
Body
application/json
Response
Access row saved
What one user is allowed to reach on a gateway.
Whether the user can use the gateway at all
Visibility profile assigned to the user
Extra tools hidden for this user, on top of the profile
⌘I