更新组织安全 Profile
curl --request PATCH \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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>",
"org_id": "<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"
}安全配置(组织)[测试版]
更新组织安全 Profile
更新组织自有的安全 Profile。省略的字段 保持不变;显式传入 null 会清除 net_policy / mcp_config。
PATCH
/
v3beta1
/
organizations
/
{org_id}
/
security-profiles
/
{profile_id}
更新组织安全 Profile
curl --request PATCH \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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/organizations/{org_id}/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>",
"org_id": "<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"
}更新组织所属的安全 Profile。正在运行的会话会沿用其上次启动或唤醒时解析出的限制;更改会立即对新会话生效,现有会话则在下次恢复时生效。
权限
需要使用在组织级别拥有ManageSecureModeProfiles 权限的服务用户或个人访问令牌。正在运行的 Devin 会话所使用的令牌会被拒绝,因此会话无法修改约束其自身的 Profile。
行为
- 省略的字段保持不变。
- 显式传入
null会清除该 Profile 在net_policy、mcp_config、slack_channel_access、slack_dm_scope、teams_channel_access、teams_dm_scope和teams_group_chat_scope上的设置。其他字段不接受null。 net_policy: null表示该 Profile 未指定任何网络策略,而非拒绝所有访问。如需拒绝所有访问,请使用{"allow": []}。mcp_config.servers通过 slug 列出 MCP 服务器 (可以是 MCP Marketplace 中的 slug,例如github,也可以是某个安装实例的 slug) 。
请求体
application/json
PATCH 语义:省略的字段保持不变;显式传入 null 会清除可为空的字段(net_policy、mcp_config、slack_channel_access、 slack_dm_scope、teams_channel_access、teams_dm_scope、 teams_group_chat_scope),其他字段则不接受 null。
响应
成功响应
组织拥有的安全 Profile。

