Claude Platform Docs

コンプライアンス設定を更新

$client->organization->complianceSettings->update(ComplianceSettingsStateParam state): OrganizationComplianceSettings
POST/v1/organizations/compliance_settings

組織のコンプライアンス設定を更新します。

state を enabled に設定すると、Compliance API が有効になり、組織のアクティビティイベントの記録が開始されます。disabled に設定すると、両方が無効になります。ただし、Access Transparency イベントは例外です。これらは Compliance API が無効になっている間も記録され、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.

Returns
class OrganizationComplianceSettings { $type = 'compliance_settings'; $state; }
"compliance_settings" type

Whether the Compliance API is enabled for this organization.

コンプライアンス設定を更新
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;

$client = new Client(apiKey: 'my-anthropic-api-key');

$organizationComplianceSettings = $client
  ->organization
  ->complianceSettings
  ->update(state: ['type' => 'enabled']);

var_dump($organizationComplianceSettings);
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}