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"
}