跳转到主要内容
POST
创建组织安全 Profile
创建一个归属于该组织的安全 Profile。创建 Profile 后,它不会自动应用到任何对象;请通过设置组织安全 Profile 默认值将其绑定为默认值。

权限

需要使用在组织级别具有 ManageSecureModeProfiles 权限的服务用户或个人访问令牌。正在运行的 Devin 会话所使用的令牌会被拒绝,因此会话无法修改约束其自身的 Profile。

行为

  • 仅 name 为必填项。Profile 名称在组织内必须唯一。
  • 省略 net_policy 时,Profile 的初始配置为仅包含 Git 集成主机的允许列表 (与设置页面的初始配置相同) 。显式设为 null 表示该 Profile 不对网络做任何限定,而非全部拒绝。
  • remove_github_cli_token 默认为 true。若要保留该令牌 (设为 false) ,需设置 git_access_level: read_write;如果设置了网络策略,允许列表中还必须包含 api.github.com。
  • git_access_level 默认为 read_write,enforcement_level 默认为 recommended。

授权

Authorization
string
header
必填

服务用户凭据(前缀:cog_)

路径参数

org_id
string
必填

组织 ID(前缀:org-)

示例:

"org-abc123def456"

请求体

application/json
name
string
必填
Required string length: 1 - 128
devin_mcp_read_only
boolean
默认值:false
enforcement_level
enum<string>
默认值:recommended
可用选项:
recommended,
mandatory
git_access_level
enum<string>
默认值:read_write
可用选项:
read_only,
read_write
mcp_config
SecurityProfileMcpConfig · object | null
net_policy
SecurityProfileNetPolicy · object | null

省略 = 仅包含 Git 集成主机的允许列表(与安全配置用户界面的初始默认值相同);显式设为 null = 此 Profile 不对网络作规定(并不表示全部拒绝)。由于默认允许列表不包含 api.github.com,remove_github_cli_token=false 的请求必须显式提供 net_policy(也可设为 null)。

remove_github_cli_token
boolean
默认值:true
slack_channel_access
SecurityProfileSlackChannelAccess · object | null

省略或设为 null = 此 Profile 不对 Slack 频道作规定(使用组织的 Slack 设置)。

slack_dm_scope
enum<string> | null

省略或设为 null = 此 Profile 不对 Slack 私信作规定(使用组织的 Slack 设置)。

可用选项:
disabled,
org_members,
workspace
teams_channel_access
SecurityProfileTeamsChannelAccess · object | null

省略或设为 null = 此 Profile 不对 Teams 频道作规定(使用组织的 Teams 默认访问设置)。

teams_dm_scope
enum<string> | null

省略或设为 null = 此 Profile 不对 Teams 私信作规定(使用组织的 Teams 默认访问设置)。

可用选项:
disabled,
installed_users
teams_group_chat_scope
enum<string> | null

省略或设为 null = 此 Profile 不对 Teams 群聊作规定(与私信一样,由组织的 Teams 默认访问设置派生)。

可用选项:
disabled,
origin_chat

响应

成功响应

组织拥有的安全 Profile。

created_at
integer
必填
devin_mcp_read_only
boolean
必填

为 true 时,会话只能调用只读 Devin MCP 工具(不允许创建会话、管理自动化或执行其他写入操作)。

enforcement_level
enum<string>
必填

recommended Profile 可被下级绑定覆盖;mandatory Profile 则设定限制基线,下级策略只能进一步收紧限制。

可用选项:
recommended,
mandatory
git_access_level
enum<string>
必填
可用选项:
read_only,
read_write
name
string
必填
org_id
string
必填
profile_id
string
必填

安全 Profile 的 ID。

remove_github_cli_token
boolean
必填

为 true 时,从会话所在的机器中移除 GitHub CLI 令牌,阻止直接访问 GitHub API。

updated_at
integer
必填
mcp_config
SecurityProfileMcpConfig · object | null

null = 此 Profile 不对 MCP 作规定。

net_policy
SecurityProfileNetPolicy · object | null

null = 此 Profile 不对网络作规定(并不表示全部拒绝)。

slack_channel_access
SecurityProfileSlackChannelAccess · object | null

限定受此 Profile 管理的会话可在哪些 Slack 频道中读取和发布消息。null = 此 Profile 不作规定,使用组织的 Slack 设置。

slack_dm_scope
enum<string> | null

限定在此 Profile 下谁可以在 Slack 中向 Devin 发送私信。null = 此 Profile 不作规定,使用组织的 Slack 设置。对于企业账户,'workspace' 的范围会缩小为 'org_members'。

可用选项:
disabled,
org_members,
workspace
teams_channel_access
SecurityProfileTeamsChannelAccess · object | null

限定受此 Profile 管理的会话可在哪些 Microsoft Teams 频道中读取和发布消息。null = 此 Profile 不作规定,使用组织的 Teams 默认访问设置。

teams_dm_scope
enum<string> | null

限定在此 Profile 下 Devin 可以在 Microsoft Teams 中向谁发送私信。null = 此 Profile 不作规定,使用组织的 Teams 默认访问设置。

可用选项:
disabled,
installed_users
teams_group_chat_scope
enum<string> | null

限定在此 Profile 下 Devin 可以读取哪些 Teams 群聊;origin_chat = 仅限发起会话的群聊;null = 不作规定,与私信一样,由组织的 Teams 默认访问设置派生。

可用选项:
disabled,
origin_chat