curl --request PATCH \
--url https://api.devin.ai/v3beta1/enterprise/security-profiles/{profile_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"devin_mcp_read_only": true,
"mcp_config": {
"servers": [
"<string>"
]
},
"name": "<string>",
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
},
"remove_github_cli_token": true,
"slack_channel_access": {
"channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
]
},
"teams_channel_access": {
"channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
]
}
}
'import requests
url = "https://api.devin.ai/v3beta1/enterprise/security-profiles/{profile_id}"
payload = {
"devin_mcp_read_only": True,
"mcp_config": { "servers": ["<string>"] },
"name": "<string>",
"net_policy": { "allow": [{ "hostname": "<string>" }] },
"remove_github_cli_token": True,
"slack_channel_access": { "channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
] },
"teams_channel_access": { "channels": [
{
"channel_id": "<string>",
"team_id": "<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({
devin_mcp_read_only: true,
mcp_config: {servers: ['<string>']},
name: '<string>',
net_policy: {allow: [{hostname: '<string>'}]},
remove_github_cli_token: true,
slack_channel_access: {channels: [{channel_id: '<string>', team_id: '<string>'}]},
teams_channel_access: {channels: [{channel_id: '<string>', team_id: '<string>'}]}
})
};
fetch('https://api.devin.ai/v3beta1/enterprise/security-profiles/{profile_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.devin.ai/v3beta1/enterprise/security-profiles/{profile_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([
'devin_mcp_read_only' => true,
'mcp_config' => [
'servers' => [
'<string>'
]
],
'name' => '<string>',
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
],
'remove_github_cli_token' => true,
'slack_channel_access' => [
'channels' => [
[
'channel_id' => '<string>',
'team_id' => '<string>'
]
]
],
'teams_channel_access' => [
'channels' => [
[
'channel_id' => '<string>',
'team_id' => '<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.devin.ai/v3beta1/enterprise/security-profiles/{profile_id}"
payload := strings.NewReader("{\n \"devin_mcp_read_only\": true,\n \"mcp_config\": {\n \"servers\": [\n \"<string>\"\n ]\n },\n \"name\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n },\n \"remove_github_cli_token\": true,\n \"slack_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n },\n \"teams_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\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.devin.ai/v3beta1/enterprise/security-profiles/{profile_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"devin_mcp_read_only\": true,\n \"mcp_config\": {\n \"servers\": [\n \"<string>\"\n ]\n },\n \"name\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n },\n \"remove_github_cli_token\": true,\n \"slack_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n },\n \"teams_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/enterprise/security-profiles/{profile_id}")
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 \"devin_mcp_read_only\": true,\n \"mcp_config\": {\n \"servers\": [\n \"<string>\"\n ]\n },\n \"name\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n },\n \"remove_github_cli_token\": true,\n \"slack_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n },\n \"teams_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": 123,
"devin_mcp_read_only": true,
"enforcement_level": "recommended",
"git_access_level": "read_only",
"name": "<string>",
"profile_id": "<string>",
"remove_github_cli_token": true,
"updated_at": 123,
"mcp_config": {
"servers": [
"<string>"
]
},
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
},
"slack_channel_access": {
"mode": "none",
"channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
]
},
"slack_dm_scope": "disabled",
"teams_channel_access": {
"mode": "none",
"channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
]
},
"teams_dm_scope": "disabled",
"teams_group_chat_scope": "disabled"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Ein Security Profile auf Enterprise-Ebene aktualisieren
Ein Enterprise-eigenes Security Profile aktualisieren. Nicht angegebene Felder bleiben unverändert; ein expliziter null-Wert löscht net_policy / mcp_config.
curl --request PATCH \
--url https://api.devin.ai/v3beta1/enterprise/security-profiles/{profile_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"devin_mcp_read_only": true,
"mcp_config": {
"servers": [
"<string>"
]
},
"name": "<string>",
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
},
"remove_github_cli_token": true,
"slack_channel_access": {
"channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
]
},
"teams_channel_access": {
"channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
]
}
}
'import requests
url = "https://api.devin.ai/v3beta1/enterprise/security-profiles/{profile_id}"
payload = {
"devin_mcp_read_only": True,
"mcp_config": { "servers": ["<string>"] },
"name": "<string>",
"net_policy": { "allow": [{ "hostname": "<string>" }] },
"remove_github_cli_token": True,
"slack_channel_access": { "channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
] },
"teams_channel_access": { "channels": [
{
"channel_id": "<string>",
"team_id": "<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({
devin_mcp_read_only: true,
mcp_config: {servers: ['<string>']},
name: '<string>',
net_policy: {allow: [{hostname: '<string>'}]},
remove_github_cli_token: true,
slack_channel_access: {channels: [{channel_id: '<string>', team_id: '<string>'}]},
teams_channel_access: {channels: [{channel_id: '<string>', team_id: '<string>'}]}
})
};
fetch('https://api.devin.ai/v3beta1/enterprise/security-profiles/{profile_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.devin.ai/v3beta1/enterprise/security-profiles/{profile_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([
'devin_mcp_read_only' => true,
'mcp_config' => [
'servers' => [
'<string>'
]
],
'name' => '<string>',
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
],
'remove_github_cli_token' => true,
'slack_channel_access' => [
'channels' => [
[
'channel_id' => '<string>',
'team_id' => '<string>'
]
]
],
'teams_channel_access' => [
'channels' => [
[
'channel_id' => '<string>',
'team_id' => '<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.devin.ai/v3beta1/enterprise/security-profiles/{profile_id}"
payload := strings.NewReader("{\n \"devin_mcp_read_only\": true,\n \"mcp_config\": {\n \"servers\": [\n \"<string>\"\n ]\n },\n \"name\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n },\n \"remove_github_cli_token\": true,\n \"slack_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n },\n \"teams_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\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.devin.ai/v3beta1/enterprise/security-profiles/{profile_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"devin_mcp_read_only\": true,\n \"mcp_config\": {\n \"servers\": [\n \"<string>\"\n ]\n },\n \"name\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n },\n \"remove_github_cli_token\": true,\n \"slack_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n },\n \"teams_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/enterprise/security-profiles/{profile_id}")
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 \"devin_mcp_read_only\": true,\n \"mcp_config\": {\n \"servers\": [\n \"<string>\"\n ]\n },\n \"name\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n },\n \"remove_github_cli_token\": true,\n \"slack_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n },\n \"teams_channel_access\": {\n \"channels\": [\n {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": 123,
"devin_mcp_read_only": true,
"enforcement_level": "recommended",
"git_access_level": "read_only",
"name": "<string>",
"profile_id": "<string>",
"remove_github_cli_token": true,
"updated_at": 123,
"mcp_config": {
"servers": [
"<string>"
]
},
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
},
"slack_channel_access": {
"mode": "none",
"channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
]
},
"slack_dm_scope": "disabled",
"teams_channel_access": {
"mode": "none",
"channels": [
{
"channel_id": "<string>",
"team_id": "<string>"
}
]
},
"teams_dm_scope": "disabled",
"teams_group_chat_scope": "disabled"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Berechtigungen
Erfordert einen Service-Benutzer oder ein persönliches Zugriffstoken mit der BerechtigungManageAccountSecureModeProfiles auf Enterprise-Ebene. Nur für Enterprise-Konten verfügbar.
Verhalten
- Weggelassene Felder bleiben unverändert.
- Ein explizites
nulllöscht die Vorgabe des Profils fürnet_policy,mcp_config,slack_channel_access,slack_dm_scope,teams_channel_access,teams_dm_scopeundteams_group_chat_scope. Bei allen anderen Feldern wirdnullabgelehnt. net_policy: nullbedeutet, dass das Profil keine Netzwerkvorgabe hat – nicht, dass alles verweigert wird. Um alles zu verweigern, verwenden Sie{"allow": []}.mcp_config.serverslistet MCP-Server anhand ihres Slugs auf (ein Marketplace-Slug wiegithuboder der Slug einer Installation).
Body
PATCH-Semantik: Ausgelassene Felder bleiben unverändert; ein explizites null löscht die Felder, die null zulassen (net_policy, mcp_config, slack_channel_access, slack_dm_scope, teams_channel_access, teams_dm_scope, teams_group_chat_scope), und wird für die übrigen abgelehnt.
Antwort
Erfolgreiche Antwort
Ein Security Profile im Besitz eines Enterprise, das allen Organisationen im Enterprise zur Verfügung steht. Das zugehörige Enterprise ergibt sich aus dem Token des Aufrufers.
Begrenzt, wer Devin unter diesem Profil Direktnachrichten in Slack senden darf. null = dieses Profil macht keine Vorgabe; es gilt die Slack-Einstellung der Organisation. 'workspace' wird bei Enterprise-Konten auf 'org_members' eingeschränkt.
disabled, org_members, workspace Begrenzt, welche Teams-Gruppenchats Devin unter diesem Profil lesen darf; origin_chat = nur der Gruppenchat, aus dem die Sitzung gestartet wurde; null = keine Vorgabe, der Zugriff wird wie bei Direktnachrichten aus dem Teams-Standardzugriff der Organisation abgeleitet.
disabled, origin_chat 
