Claude Platform Docs

更新合规设置

POST/v1/organizations/compliance_settings

更新您组织的合规设置。

state 设置为 enabled 会开启 Compliance API 并开始捕获组织活动事件。将其设置为 disabled 会同时关闭两者。state 反映 Compliance API 是否已启用。

state 设置为其当前值的请求会成功,且资源保持不变。disabled 请求将持续生效,直到后续的 enabled 请求或组织下一次启用 Access Transparency 的配置操作为止:启用 Access Transparency 也会启用 Compliance API(后者提供其活动事件),因此此类配置操作(包括重新运行)即使在 disabled 请求之后也会重新启用 Compliance API。自动配置永远不会禁用合规设置。

Body

Desired state. Accepts the string shorthand "enabled" or "disabled" in place of the object form; the response always returns the canonical object form.

One of the following:
BetaComplianceSettingsStateEnabledParam object{ type }
type: "enabled"
BetaComplianceSettingsStateDisabledParam object{ type }
type: "disabled"
Returns
BetaComplianceSettings object{ state, type }

Whether the Compliance API is enabled for this organization.

One of the following:
BetaComplianceSettingsStateEnabled object{ type }
type: "enabled"
defaultenabled
BetaComplianceSettingsStateDisabled object{ type }
type: "disabled"
defaultdisabled
type: "compliance_settings"
defaultcompliance_settings
更新合规设置
curl https://api.anthropic.com/v1/organizations/compliance_settings \
    -H 'Content-Type: application/json' \
    -H 'anthropic-version: 2023-06-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY" \
    -d '{
          "state": {
            "type": "enabled"
          }
        }'
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}