---
title: Safety Cases API
url: https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/safety-cases-api
description: 使用 Compliance API 透過 HTTP 列出、讀取及回應 Safety Cases。
---

Safety Cases API 透過 HTTP 提供 Safety Cases。它目前處於測試版。您可以在 **Safety Case and Transcript storage** 下為每個工作區選取[案例儲存貯體](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/faq#glossary)。若沒有儲存貯體，您將不會收到針對含有使用者設定檔之訊息的 Safety Cases。此 API 是 [Compliance API](https://platform.claude.com/docs/zh-TW/manage-claude/compliance-api) 的一部分，且僅在 Claude Platform 上提供。若要了解您的團隊如何審查及回應 Safety Case，請參閱[審查 Safety Cases](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/flagged-cases)。

<Warning>
  Enterprise Frontier Safeguards 目前處於測試版階段。此功能依據您與 Anthropic 之間的協議提供，例如僅限內部使用條款、[商業服務條款](https://www.anthropic.com/legal/commercial-terms)和[服務特定條款](https://www.anthropic.com/legal/service-specific-terms)。在測試版期間，設定和行為可能會有所變更。
</Warning>

## 取得存取權

若要取得 Safety Cases API 的存取權：

1. **開啟 Compliance API。** 您的組織必須已開啟它。如果它處於關閉狀態，請參閱[設定 Compliance API](https://platform.claude.com/docs/zh-TW/manage-claude/compliance-api-access#set-up-the-compliance-api) 以將其開啟。
2. **建立 Console Admin API 金鑰。** 以組織管理員身分在 Claude Console 中[建立金鑰](https://platform.claude.com/docs/zh-TW/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization)。沒有需要選取的範圍。只有在您的組織可使用此 API 期間建立的金鑰，才能存取 Safety Cases API。您較早建立的 Console Admin API 金鑰永遠不會取得此存取權。如果您關閉 Compliance API，Safety Cases API 會以 400 錯誤拒絕您金鑰的請求。

若要測試金鑰，請使用它[列出您的 Safety Cases](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/safety-cases-api#poll)：

| 回應 | 意義及應採取的行動 |
| ----- | ----- |
| 200（即使清單為空） | 您的金鑰可以列出 Safety Cases。您只會收到未使用 Anthropic Human Review 之工作區的 Safety Cases。 |
| 401、403 或 404 | 您的金鑰無法列出 Safety Cases。請確認您傳送了完整的金鑰，然後建立另一把 Console Admin API 金鑰並再試一次。 |
| 新金鑰收到 403 或 404 | 您的組織無法使用此 API。 |

請刪除任何您不需要的 Console Admin API 金鑰。

即使位於上層組織之下，金鑰也只能存取其所屬組織的 Safety Cases 和訊息。這是一把完整的 Console Admin API 金鑰。在您的組織可使用此 API 期間，您建立的每把 Console Admin API 金鑰都會取得此存取權。因此，請限制可以建立及持有這些金鑰的人員。測試組織的金鑰不會取得此存取權。

金鑰會取得以下全部三個範圍：

| 範圍 | 允許的操作 |
| ----- | ----- |
| `read:compliance_review_cases` | 列出及讀取 Safety Cases 和 Safety Notices，這些內容絕不會包含訊息的提示或回應。 |
| `read:compliance_review_items` | 讀取被標記訊息的提示、回應及傳送者。 |
| `write:compliance_review_cases` | 回應 Safety Case。 |

其他金鑰也可以讀取這些資料：

* **Safety Cases 和 Safety Notices：** 在提供此 API 的情況下，具有 [`read:org_audit`](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-admin-api-key-scopes#across-several-apis) 的金鑰只能讀取其所屬組織的 Safety Cases 和 Safety Notices。只有在該組織具有上層組織時，它們才能這麼做。
* **被標記的訊息：** 在某些組織中，具有 `read:org_audit` 的金鑰也可以讀取被標記的訊息，具有 `read:compliance_user_data` 的金鑰也可以。其中部分金鑰可存取其上層組織下每個組織的被標記訊息。

請在每個請求中傳送 [`anthropic-version`](https://platform.claude.com/docs/zh-TW/api/versioning) 標頭。未包含此標頭的請求可能會傳回 400 錯誤。發生 429 或 503 錯誤後，請稍後重試該請求。

## 輪詢 Safety Cases

請定期檢查 Safety Cases API 是否有新的 Safety Cases，以便您能及時回應。

第一次執行時，請省略 `updated_at[gte]`。接著，儲存您已讀取的最大 `updated_at` 值，並在下次執行時將其作為 `updated_at[gte]` 傳送：

<CodeGroup>
  ```bash cURL
  curl --fail-with-body -sS -G \
    "https://api.anthropic.com/v1/compliance/review/cases" \
    --data-urlencode "updated_at[gte]=2026-11-23T18:15:34Z" \
    -d "order_by=updated_at" \
    -d "order=asc" \
    -d "limit=100" \
    -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
    -H "anthropic-version: 2026-10-21"
  ```

  ```bash CLI
  # 會視需要擷取更多頁面，因此 `--limit` 設定的是每頁大小，而非總數。
  ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:cases list \
    --updated-at-gte 2026-11-23T18:15:34Z \
    --order-by updated_at \
    --order asc \
    --limit 100
  ```

  ```python Python
  client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])

  cases = client.beta.compliance.review.cases.list(
      updated_at_gte="2026-11-23T18:15:34Z",
      order_by="updated_at",
      order="asc",
      limit=100,
  )

  # 會視需要自動擷取更多頁面，因此 `limit` 設定的是每頁大小，而非總數。
  for case in cases:
      print(case.id, case.status.type, case.updated_at)
  ```

  ```typescript TypeScript
  const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });

  const cases = await client.beta.compliance.review.cases.list({
    "updated_at[gte]": "2026-11-23T18:15:34Z",
    order_by: "updated_at",
    order: "asc",
    limit: 100
  });

  // 會視需要自動擷取更多頁面，因此 `limit` 設定的是每頁大小，而非總數。
  for await (const reviewCase of cases) {
    console.log(reviewCase.id, reviewCase.status.type, reviewCase.updated_at);
  }
  ```

  ```csharp C#
  using Anthropic.Models.Beta.Compliance.Review;
  using Anthropic.Models.Beta.Compliance.Review.Cases;

  AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };

  var page = await client.Beta.Compliance.Review.Cases.List(
      new()
      {
          UpdatedAtGte = DateTimeOffset.Parse("2026-11-23T18:15:34Z"),
          OrderBy = BetaComplianceReviewCaseOrderBy.UpdatedAt,
          Order = BetaComplianceReviewOrder.Asc,
          Limit = 100,
      }
  );

  // 會視需要自動擷取更多頁面，因此 `limit` 設定的是每頁大小，而非總數。
  await foreach (var reviewCase in page.Paginate())
  {
      Console.WriteLine($"{reviewCase.ID} {reviewCase.Status.Type.Raw()} {reviewCase.UpdatedAt}");
  }
  ```

  ```go Go
  client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))

  cases := client.Beta.Compliance.Review.Cases.ListAutoPaging(
  	context.Background(),
  	anthropic.BetaComplianceReviewCaseListParams{
  		UpdatedAtGte: anthropic.Time(time.Date(2026, time.November, 23, 18, 15, 34, 0, time.UTC)),
  		OrderBy:      anthropic.BetaComplianceReviewCaseOrderByUpdatedAt,
  		Order:        anthropic.BetaComplianceReviewOrderAsc,
  		Limit:        anthropic.Int(100),
  	},
  )

  // 會視需要自動擷取更多頁面，因此 `limit` 設定的是每頁大小，而非總數。
  for cases.Next() {
  	reviewCase := cases.Current()
  	fmt.Println(reviewCase.ID, reviewCase.Status.Type, reviewCase.UpdatedAt)
  }
  if err := cases.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  import com.anthropic.models.beta.compliance.review.BetaComplianceReviewOrder;
  import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewCaseOrderBy;
  import com.anthropic.models.beta.compliance.review.cases.CaseListParams;
  import java.time.OffsetDateTime;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.builder()
          .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
          .build();

      var params = CaseListParams.builder()
          .updatedAtGte(OffsetDateTime.parse("2026-11-23T18:15:34Z"))
          .orderBy(BetaComplianceReviewCaseOrderBy.UPDATED_AT)
          .order(BetaComplianceReviewOrder.ASC)
          .limit(100)
          .build();
      var cases = client.beta().compliance().review().cases().list(params);

      // 會視需要自動擷取更多頁面，因此 `limit` 設定的是每頁大小，而非總數。
      for (var reviewCase : cases.autoPager()) {
          IO.println(reviewCase.id() + " " + reviewCase.status().type() + " " + reviewCase.updatedAt());
      }
  }
  ```

  ```php PHP
  $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);

  $cases = $client->beta->compliance->review->cases->list(
      updatedAtGte: new \DateTimeImmutable('2026-11-23T18:15:34Z'),
      orderBy: 'updated_at',
      order: 'asc',
      limit: 100,
  );

  // 會視需要自動擷取更多頁面，因此 `limit` 設定的是每頁大小，而非總數。
  foreach ($cases->pagingEachItem() as $case) {
      echo $case->id, ' ', $case->status->type, ' ', $case->updatedAt->format(\DateTimeInterface::ATOM), PHP_EOL;
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))

  cases = client.beta.compliance.review.cases.list(
    updated_at_gte: Time.utc(2026, 11, 23, 18, 15, 34),
    order_by: :updated_at,
    order: :asc,
    limit: 100
  )

  # 會視需要自動擷取更多頁面，因此 `limit` 設定的是每頁大小，而非總數。
  cases.auto_paging_each do |review_case|
    puts "#{review_case.id} #{review_case.status.type} #{review_case.updated_at}"
  end
  ```
</CodeGroup>

```json Response
{
  "data": [
    {
      "type": "compliance_review_case",
      "id": "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
      "organization_id": "abcdef01-2345-6789-abcd-ef0123456789",
      "status": { "type": "open" },
      "created_at": "2026-11-23T18:42:07.106255Z",
      "updated_at": "2026-11-23T18:42:07.106255Z",
      "workspace_id": "wrkspc_01AbCdEfGhJkLmNpQrStUvWx",
      "policy_categories": ["cyber"],
      "enforcement_action": null,
      "transcripts": [
        {
          "item_id": "msg_01XFDUDYJgAACzvnptvVoYEL",
          "user_profile_id": null
        }
      ]
    }
  ],
  "next_page": null
}
```

此請求會傳回自該時間以來開啟、關閉或收到 Safety Notice 的 Safety Cases。若要讀取單一 Safety Case，請傳送 `GET /v1/compliance/review/cases/{case_id}`。

建置輪詢作業時，請遵循以下建議：

* **讀取每一頁。** 若要讀取下一頁，請將 `next_page` 作為 `page` 傳送，直到請求傳回的 `next_page` 為 `null`。即使已設定 `next_page`，頁面也可能很短或為空。
* **不要在多次執行之間保留 `next_page`。** 它僅在單一清單結果內有效，若篩選條件或排序不同，API 會以 400 錯誤拒絕它。
* **依 `id` 更新您所保存的每個 Safety Case 副本。** API 也會傳回比您傳送的時間稍早的 Safety Cases，並會在 Safety Case 關閉或收到 Safety Notice 時再次傳回它。
* **依 `updated_at` 而非 `created_at` 進行篩選。** 依 `created_at` 篩選會遺漏在您首次讀取後才關閉或收到 Safety Notice 的 Safety Case，也可能遺漏新的 Safety Case。

已關閉的 Safety Case 其 `status.type` 會設為 `closed`，而 `status.reason.type` 則說明原因：

| `status.reason.type` | 意義 |
| ----- | ----- |
| `responded` | Anthropic 已收到您的回應。 |
| `window_ended` | Anthropic 在 `created_at` 後的 7 個日曆天內未收到有效回應。 |
| `ended_by_anthropic` | Anthropic 在此之前結束了該 Safety Case。 |

Anthropic 可能會新增欄位、`policy_categories` 值、`enforcement_action` 類型及關閉原因，因此請接受您不認得的項目。

### 輪詢 Safety Notices

Safety Notice 是 Anthropic 針對您的一個或多個 Safety Cases，或針對您整個組織所發出的訊息。它可能要求您在指定時間前答覆。其 `kind.type` 說明它屬於哪一種類型：

| `kind.type` | 類型說明 |
| ----- | ----- |
| `response_requested` | 回應請求。若要答覆，請[回應 Safety Case](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/safety-cases-api#respond)。 |
| `warning` | 警告。 |
| `question` | 問題。若要答覆，請聯絡您的 Anthropic 客戶團隊。 |

Anthropic 可能會新增其他類型，因此請接受您不認得的值。請勿依賴 Safety Notice 來提醒您尚未處理的開啟中 Safety Case：在您的案例儲存貯體中沒有檔案的 Safety Case 不會收到自動提醒。

若要讀取 Safety Notices，請輪詢 `GET /v1/compliance/review/notices`：

* **傳送 `created_at[gte]` 和 `order=asc`，** 並儲存您已讀取的最大 `created_at` 值。Safety Notices 沒有 `updated_at` 或 `order_by`，而且永遠不會變更。
* **讀取每一頁，** 如同處理 Safety Cases 一樣。
* **依 `id` 比對 Safety Notices，** 因為結果可能會重複。

Safety Notices 清單如下所示：

```json Response
{
  "data": [
    {
      "type": "compliance_review_notice",
      "id": "rvn_01Jt5Yw2MnQx8VbK4zRcHd6F",
      "organization_id": "abcdef01-2345-6789-abcd-ef0123456789",
      "case_ids": ["rvc_01Hq3Zt8KpWv5NcR2yLbXs7D"],
      "kind": { "type": "response_requested" },
      "created_at": "2026-11-27T18:00:00Z",
      "message": "Anthropic has found no valid response to the Case in case_ids. Review the Case and write your response file before the time in respond_by. If you wrote a valid response file in the last hour, ignore this notice.",
      "respond_by": "2026-11-30T18:42:07Z"
    }
  ],
  "next_page": null
}
```

如果 Safety Notice 沒有期限，`respond_by` 為 `null`。[Safety Notice 檔案](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/safety-case-files#notice)具有相同的欄位，但不含 `type` 和 `organization_id`，並包含 `schema_version`。

### 欄位與檔案的差異

Anthropic 也可以將 Safety Cases 寫入您自己雲端帳戶中的儲存貯體，作為 [Safety Case 檔案](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/safety-case-files)。這些檔案是讀取及回應 Safety Cases 的另一種方式。檔案使用與 API 相同的欄位名稱，但有以下差異：

| 在 API 中 | 在 [Safety Case 檔案](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/safety-case-files#safety-case-file)中 |
| ----- | ----- |
| `type`、`organization_id` | 不在檔案中 |
| 若沒有值，或訊息已超過 28 天，`transcripts[].user_profile_id` 為 `null` | 若沒有值，則省略該鍵 |
| 不在 API 中 | `schema_version`、`transcripts[].object_key`、`derived_data_object_keys` |
| 已關閉的 Safety Case 一律具有 `status.reason` | `status.reason` 可以是 `null` |
| 當 Safety Notice 提及該 Safety Case 時，`updated_at` 也會變更 | 只有在 Anthropic 寫入檔案時，`updated_at` 才會變更 |
| 時間包含秒的小數部分 | 時間以整秒表示。`created_at` 可能稍早一些。 |

## 讀取訊息

擷取 `transcripts` 中的每個 `item_id`。您能否讀取以使用者設定檔傳送的訊息，取決於所使用的金鑰：

* **Console Admin API 金鑰**無法讀取此類訊息。該請求會傳回 404 錯誤。如果該工作區有案例儲存貯體，Anthropic 會將該訊息的[逐字記錄](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/safety-case-files#transcript)寫入該案例儲存貯體。
* **其他金鑰**在某些組織中可以讀取此類訊息（請參閱[取得存取權](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access)）。使用此類金鑰時，請在 `anthropic-user-profile-id` 標頭中傳送該使用者設定檔的 ID。對於其他任何訊息，請省略該標頭。缺少 ID 或使用其他使用者設定檔的 ID 會傳回 404 錯誤，針對您未使用使用者設定檔傳送的訊息提供 ID 也會傳回 404 錯誤。

<CodeGroup>
  ```bash cURL
  curl --fail-with-body -sS \
    "https://api.anthropic.com/v1/compliance/review/items/msg_01XFDUDYJgAACzvnptvVoYEL" \
    -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
    -H "anthropic-version: 2026-10-21"
  ```

  ```bash CLI
  ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:items retrieve \
    --item-id msg_01XFDUDYJgAACzvnptvVoYEL
  ```

  ```python Python
  client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])

  item = client.beta.compliance.review.items.retrieve("msg_01XFDUDYJgAACzvnptvVoYEL")

  print(item.to_json())
  ```

  ```typescript TypeScript
  const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });

  const item = await client.beta.compliance.review.items.retrieve(
    "msg_01XFDUDYJgAACzvnptvVoYEL"
  );

  console.log(JSON.stringify(item, null, 2));
  ```

  ```csharp C#
  AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };

  var item = await client.Beta.Compliance.Review.Items.Retrieve("msg_01XFDUDYJgAACzvnptvVoYEL");

  Console.WriteLine(item);
  ```

  ```go Go
  client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))

  item, err := client.Beta.Compliance.Review.Items.Get(
  	context.Background(),
  	"msg_01XFDUDYJgAACzvnptvVoYEL",
  	anthropic.BetaComplianceReviewItemGetParams{},
  )
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Println(item.RawJSON())
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.builder()
      .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
      .build();

  var item = client.beta().compliance().review().items().retrieve("msg_01XFDUDYJgAACzvnptvVoYEL");

  IO.println(item);
  ```

  ```php PHP
  $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);

  $item = $client->beta->compliance->review->items->retrieve('msg_01XFDUDYJgAACzvnptvVoYEL');

  echo json_encode($item, JSON_PRETTY_PRINT), PHP_EOL;
  ```

  ```ruby Ruby
  client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))

  item = client.beta.compliance.review.items.retrieve("msg_01XFDUDYJgAACzvnptvVoYEL")

  puts item.to_json
  ```
</CodeGroup>

回應包含該訊息，以及 Anthropic 所記錄的傳送者：

```json Response
{
  "type": "compliance_review_item",
  "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
  "organization_id": "abcdef01-2345-6789-abcd-ef0123456789",
  "created_at": "2026-11-23T17:58:12.482913Z",
  "content_expires_at": "2026-12-21T17:58:12.482913Z",
  "workspace_id": "wrkspc_01AbCdEfGhJkLmNpQrStUvWx",
  "actor": {
    "type": "user_actor",
    "user_id": "user_01JkWm4Rt7YpXc2NvBq9sZdH",
    "email_address": "user@example.com"
  },
  "user_profile_id": null,
  "read_reason": { "type": "safeguards_review" },
  "details": {
    "type": "message",
    "model": "claude-opus-5-5",
    "content": {
      "type": "create_message",
      "request": {
        "model": "claude-opus-5-5",
        "max_tokens": 1024,
        "messages": [{ "role": "user", "content": "Hello, Claude" }]
      },
      "response": {
        "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
        "type": "message",
        "role": "assistant",
        "content": [{ "type": "text", "text": "Hello! How can I help you today?" }]
      }
    },
    "content_unavailable_reason": null
  }
}
```

`details.content` 包含儲存的請求和回應。它並非完全相同的副本：Anthropic 會將部分 URL 截短為其主機名稱、遮蔽 MCP 伺服器權杖、移除思考區塊，並可能以調整過大小的圖片或預留位置取代圖片或文件。如果未儲存任何回應，`details.content.response` 為 `null`。

Anthropic 會在 `actor` 中為每則訊息記錄一個傳送者：

| 傳送者 | `actor` |
| ----- | ----- |
| [個人金鑰](https://platform.claude.com/docs/zh-TW/manage-claude/api-keys#key-types)或使用者的登入 | `user_actor`，包含該帳戶的 `user_id` 和 `email_address` |
| 工作區金鑰 | `api_actor`，包含該金鑰的 `api_key_id` |
| 服務帳戶 | `service_account_actor`，包含其 `service_account_id` |
| 未記錄任何傳送者 | `null` |

`user_actor` 識別的是該帳戶，而非撰寫提示的人員。若要找出該人員，請使用您自己的紀錄（請參閱[記錄訊息 ID](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/flagged-cases#log-message-ids)）。在沒有上層組織的組織中，`email_address` 一律為 `null`，在其他組織中則可能為 `null`。

Anthropic 可能會新增其他 `actor`、`read_reason` 和 `content_unavailable_reason` 類型，因此請接受您不認得的類型。

Safety Case 可能會列出您無法讀取的訊息。下表說明請求可能傳回的結果：

| 結果 | 意義 | 應採取的行動 |
| ----- | ----- | ----- |
| 404 錯誤 | 例如，訊息已過期或不再被標記。 | 404 錯誤可能是暫時性的，因此在將訊息視為無法讀取之前，請稍後再試一次。 |
| 每則訊息都傳回 404 錯誤 | 如果 Anthropic 尚未為您的組織開啟訊息讀取功能，或您的組織已不再獲得 Anthropic 核准關閉 Anthropic Human Review，就會發生這種情況。 | 請參閱[尋求協助](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/flagged-cases#get-help)。404 錯誤可能是暫時性的，因此在將訊息視為無法讀取之前，請稍後再試一次。 |
| 503 錯誤 | 此錯誤可能是暫時性的。 | 在將訊息視為無法讀取之前，請稍後再試一次。如果錯誤持續發生，且該工作區具有客戶管理金鑰，請檢查該金鑰。 |
| 400 錯誤，且 `error.details.error_code` 設為 `cmek_key_disabled`、`storage_bucket_unreadable` 或 `customer_storage_refusal_unattributed` | 您的客戶管理金鑰拒絕了讀取、您的儲存貯體拒絕了讀取，或 Anthropic 無法判斷是哪一個拒絕。 | 請參閱 [`cmek_key_disabled`](https://platform.claude.com/docs/zh-TW/manage-claude/cmek-troubleshooting#cmek-key-disabled) 或[如果您的儲存貯體停止運作](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/external-storage-manage#if-your-bucket-stops-working)，然後再試一次。如果您這端沒有任何變更，請參閱[尋求協助](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/flagged-cases#get-help)。 |
| 訊息，且 `details.content` 設為 `null` | Anthropic 無法傳回文字。如果未儲存任何副本，`details.content_unavailable_reason.type` 為 `not_captured`；如果 Anthropic 無法傳回儲存的副本，則為 `stored_copy_unavailable`。`details.model` 也可能為 `null`。 | 請使用您自己的紀錄（請參閱[記錄訊息 ID](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/flagged-cases#log-message-ids)）。 |

請在 Safety Case 送達後立即讀取並儲存每則訊息，且不得晚於 `content_expires_at`。該時間最長為 `created_at` 後 28 天，且 Safety Case 處於開啟狀態並不會延長此期限。訊息可能在該時間之前就無法再讀取。

## 回應 Safety Case

調查 Safety Case 後，請回應以告知 Anthropic 您的調查結果。[回應 Safety Case](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/flagged-cases#respond-to-a-case) 說明回應所確認的內容，而[如果您未回應](https://platform.claude.com/docs/zh-TW/manage-claude/enterprise-frontier-safeguards/flagged-cases#if-you-dont-respond)則說明未回應時會發生的情況。

<Warning>
  回應會關閉該 Safety Case，因此您之後無法變更回應。
</Warning>

請在 Safety Case 的 `created_at` 後 7 個日曆天內傳送一次請求：

<CodeGroup>
  ```bash cURL
  curl --fail-with-body -sS \
    "https://api.anthropic.com/v1/compliance/review/cases/rvc_01Hq3Zt8KpWv5NcR2yLbXs7D/respond" \
    -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
    -H "anthropic-version: 2026-10-21" \
    -H "content-type: application/json" \
    -d '{
      "determination": "violation",
      "policy_categories": ["cyber"]
    }'
  ```

  ```bash CLI
  ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:cases respond \
    --case-id rvc_01Hq3Zt8KpWv5NcR2yLbXs7D \
    --determination violation \
    --policy-category cyber
  ```

  ```python Python
  client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])

  case = client.beta.compliance.review.cases.respond(
      "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
      determination="violation",
      policy_categories=["cyber"],
  )

  print(case.status.type)
  ```

  ```typescript TypeScript
  const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });

  const reviewCase = await client.beta.compliance.review.cases.respond(
    "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
    { determination: "violation", policy_categories: ["cyber"] }
  );

  console.log(reviewCase.status.type);
  ```

  ```csharp C#
  using Anthropic.Models.Beta.Compliance.Review.Cases;

  AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };

  var reviewCase = await client.Beta.Compliance.Review.Cases.Respond(
      "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
      new()
      {
          Determination = BetaComplianceReviewDetermination.Violation,
          PolicyCategories = [BetaComplianceReviewViolatedPolicyCategory.Cyber],
      }
  );

  Console.WriteLine(reviewCase.Status.Type.Raw());
  ```

  ```go Go
  client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))

  reviewCase, err := client.Beta.Compliance.Review.Cases.Respond(
  	context.Background(),
  	"rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
  	anthropic.BetaComplianceReviewCaseRespondParams{
  		Determination: anthropic.BetaComplianceReviewDeterminationViolation,
  		PolicyCategories: []anthropic.BetaComplianceReviewViolatedPolicyCategory{
  			anthropic.BetaComplianceReviewViolatedPolicyCategoryCyber,
  		},
  	},
  )
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Println(reviewCase.Status.Type)
  ```

  ```java Java
  import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewDetermination;
  import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewViolatedPolicyCategory;
  import com.anthropic.models.beta.compliance.review.cases.CaseRespondParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.builder()
          .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
          .build();

      var params = CaseRespondParams.builder()
          .caseId("rvc_01Hq3Zt8KpWv5NcR2yLbXs7D")
          .determination(BetaComplianceReviewDetermination.VIOLATION)
          .addPolicyCategory(BetaComplianceReviewViolatedPolicyCategory.CYBER)
          .build();
      var reviewCase = client.beta().compliance().review().cases().respond(params);

      IO.println(reviewCase.status().type());
  }
  ```

  ```php PHP
  $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);

  $case = $client->beta->compliance->review->cases->respond(
      'rvc_01Hq3Zt8KpWv5NcR2yLbXs7D',
      determination: 'violation',
      policyCategories: ['cyber'],
  );

  echo $case->status->type, PHP_EOL;
  ```

  ```ruby Ruby
  client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))

  review_case = client.beta.compliance.review.cases.respond(
    "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
    determination: :violation,
    policy_categories: [:cyber]
  )

  puts review_case.status.type
  ```
</CodeGroup>

`determination` 為必填，搭配 `violation` 時 `policy_categories` 為必填，而 `verdicts` 為選填：

| 欄位 | 要傳送的內容 |
| ----- | ----- |
| `determination` | 針對整個 Safety Case 的 `violation` 或 `no_violation` |
| `policy_categories` | 搭配 `violation` 時，為您所確認的一到四個類別，例如 `cyber`，若都不符合則為 `other`。`benign` 和 `undetermined` 會傳回 400 錯誤。搭配 `no_violation` 時，請省略或傳送空清單。 |
| `verdicts` | 若要個別判定訊息，請提供一份清單，其中每一項都包含 `item_id`、`determination` 和 `policy_category`（一個類別或 `null`，搭配 `no_violation` 時一律為 `null`）。 |

200 回應會傳回已關閉的 Safety Case，其 `status.reason.type` 設為 `responded`。這表示 Anthropic 已收到您的回應。

無論回應是透過 API 還是以檔案形式送達，Anthropic 都會採計第一次的回應：

| 您接下來傳送的內容 | API 傳回的結果 |
| ----- | ----- |
| 再次傳送相同的回應 | 200 回應。不會變更任何內容，因此可以安全地重試。 |
| 對已關閉的 Safety Case 傳送任何其他有效回應 | 400 錯誤，且 `error.details.error_code` 設為 `case_closed`。 |
