Claude Platform Docs

更新合規設定

$ ant organization:compliance-settings update
POST/v1/organizations/compliance_settings

更新您組織的合規設定。

將 state 設為 enabled 會開啟 Compliance API 並開始擷取組織活動事件。將其設為 disabled 則會同時關閉兩者。Access Transparency 事件是例外:即使 Compliance API 已停用,這些事件仍會被擷取,並在 Compliance API 重新啟用後由其活動摘要傳回。state 反映 Compliance API 是否已啟用。

將 state 設為其目前值的請求會成功,且資源保持不變。disabled 請求會持續生效,直到後續的 enabled 請求,或組織下一次啟用 Access Transparency 的佈建動作為止:啟用 Access Transparency 也會啟用提供其活動事件的 Compliance API,因此此類佈建(包括重新執行)即使在 disabled 請求之後也會重新啟用 Compliance API。自動化佈建絕不會停用合規設定。

Parameters

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:
compliance_settings_state_enabled_param: object{ type: "enabled" }
type: "enabled"
compliance_settings_state_disabled_param: object{ type: "disabled" }
type: "disabled"
Returns
organization_compliance_settings: object{ type: "compliance_settings", state }
type: "compliance_settings"

Whether the Compliance API is enabled for this organization.

One of the following:
compliance_settings_state_enabled: object{ type: "enabled" }
type: "enabled"
compliance_settings_state_disabled: object{ type: "disabled" }
type: "disabled"
Errors

Any method can also return the general HTTP errors.

Each code below is the value of error.details.error_code in the response body.

error code sandbox_egress_restricted⁠HTTP status 403

The request came from a Claude sandbox with restricted network access, which is not allowed to make this request. Send it from outside the sandbox, or from a sandbox with unrestricted network access.

更新合規設定
ant organization:compliance-settings update \
  --state '{type: enabled}'
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}