safety-cases-api changedmanage-claude/enterprise-frontier-safeguards/safety-cases-api
Nearest release: v2.1.333, published 4 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+416added
Lines−80removed
From line
15
where the diff opens
First seen
23 Nov 2026
this site's first read of the page
Recorded edits4to this page, all time
The whole hunk
from line 15, old and new numbered
/
The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 15
1515To get access to the Safety Cases API:
1616
17171. **Turn on the Compliance API.** You must have it on for your organization. If it’s off, see [Set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access#set-up-the-compliance-api) to turn it on.
182. **Create an Admin API key.** As an organization admin, create an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization) in the Claude Console. There are no scopes to select. An Admin API key gets access to the Safety Cases API only if you create it while the API is available to your organization. An Admin API key that you created earlier never gains this access. If you turn the Compliance API off, the Safety Cases API refuses your key’s requests with a 400 error.
182. **Create a Console Admin API key.** As an organization admin, [create the key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#create-a-key-for-a-claude-console-organization) in the Claude Console. There are no scopes to select. The key gets access to the Safety Cases API only if you create it while the API is available to your organization. A Console Admin API key that you created earlier never gains this access. If you turn the Compliance API off, the Safety Cases API refuses your key’s requests with a 400 error.
1919
2020To test the key, [list your Safety Cases](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#poll) with it:
2121
2222| Response | What it means and what to do |
2323| ----- | ----- |
2424| 200, even with an empty list | Your key can list Safety Cases. You get Safety Cases only for workspaces without Anthropic Human Review. |
25| 401, 403, or 404 | Your key can’t list Safety Cases. Check that you sent the whole key, then create another Admin API key and try again. |
25| 401, 403, or 404 | Your key can’t list Safety Cases. Check that you sent the whole key, then create another Console Admin API key and try again. |
2626| 403 or 404 with the new key | The API isn’t available to your organization. |
2727
28Delete any Admin API keys that you don’t need.
29
30The key reaches only its own organization’s Safety Cases and messages, even under a parent organization. It’s a full Admin API key. While the API is available to your organization, every Admin API key that you create gets this access. For that reason, limit who can create and hold these keys. A test organization’s keys don’t get this access.
28Delete any Console Admin API keys that you don’t need.
29
30The key reaches only its own organization’s Safety Cases and messages, even under a parent organization. It’s a full Console Admin API key. While the API is available to your organization, every Console Admin API key that you create gets this access. For that reason, limit who can create and hold these keys. A test organization’s keys don’t get this access.
3131
3232The key gets all three of the following scopes:
3333
from line 39
3939
4040Other keys can also read this data:
4141
42* **Safety Cases and Safety Notices:** Where the API is available, keys with [`read:org_audit`](https://platform.claude.com/docs/en/manage-claude/admin-api-keys#choose-scopes-for-a-claude-enterprise-key) can read only their own organization’s Safety Cases and Safety Notices. They can do this only if that organization has a parent organization.
42* **Safety Cases and Safety Notices:** Where the API is available, keys with [`read:org_audit`](https://platform.claude.com/docs/en/manage-claude/enterprise-admin-api-key-scopes#across-several-apis) can read only their own organization’s Safety Cases and Safety Notices. They can do this only if that organization has a parent organization.
4343* **Flagged messages:** In some organizations, keys with `read:org_audit` can also read the flagged messages, and so can keys with `read:compliance_user_data`. Some of these keys reach the flagged messages of every organization under their parent organization.
4444
4545Send the [`anthropic-version`](https://platform.claude.com/docs/en/api/versioning) header on every request. A request without it can return a 400 error. After a 429 or 503 error, retry the request later.
from line 50
5050
5151On your first run, leave `updated_at[gte]` out. Then, store the largest `updated_at` you have read, and send it as `updated_at[gte]` on the next run:
5252
53```bash cURL
54curl --fail-with-body -sS -G \
55 "https://api.anthropic.com/v1/compliance/review/cases" \
56 --data-urlencode "updated_at[gte]=2026-11-23T18:15:34Z" \
57 -d "order_by=updated_at" \
58 -d "order=asc" \
59 -d "limit=100" \
60 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
61 -H "anthropic-version: 2026-10-21"
62```
53<CodeGroup>
54 ```bash cURL
55 curl --fail-with-body -sS -G \
56 "https://api.anthropic.com/v1/compliance/review/cases" \
57 --data-urlencode "updated_at[gte]=2026-11-23T18:15:34Z" \
58 -d "order_by=updated_at" \
59 -d "order=asc" \
60 -d "limit=100" \
61 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
62 -H "anthropic-version: 2026-10-21"
63 ```
64
65 ```bash CLI
66 # Fetches more pages as needed, so `--limit` sets the page size, not the total.
67 ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:cases list \
68 --updated-at-gte 2026-11-23T18:15:34Z \
69 --order-by updated_at \
70 --order asc \
71 --limit 100
72 ```
73
74 ```python Python
75 client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])
76
77 cases = client.beta.compliance.review.cases.list(
78 updated_at_gte="2026-11-23T18:15:34Z",
79 order_by="updated_at",
80 order="asc",
81 limit=100,
82 )
83
84 # Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
85 for case in cases:
86 print(case.id, case.status.type, case.updated_at)
87 ```
88
89 ```typescript TypeScript
90 const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });
91
92 const cases = await client.beta.compliance.review.cases.list({
93 "updated_at[gte]": "2026-11-23T18:15:34Z",
94 order_by: "updated_at",
95 order: "asc",
96 limit: 100
97 });
98
99 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
100 for await (const reviewCase of cases) {
101 console.log(reviewCase.id, reviewCase.status.type, reviewCase.updated_at);
102 }
103 ```
104
105 ```csharp C#
106 using Anthropic.Models.Beta.Compliance.Review;
107 using Anthropic.Models.Beta.Compliance.Review.Cases;
108
109 AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };
110
111 var page = await client.Beta.Compliance.Review.Cases.List(
112 new()
113 {
114 UpdatedAtGte = DateTimeOffset.Parse("2026-11-23T18:15:34Z"),
115 OrderBy = BetaComplianceReviewCaseOrderBy.UpdatedAt,
116 Order = BetaComplianceReviewOrder.Asc,
117 Limit = 100,
118 }
119 );
120
121 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
122 await foreach (var reviewCase in page.Paginate())
123 {
124 Console.WriteLine($"{reviewCase.ID} {reviewCase.Status.Type.Raw()} {reviewCase.UpdatedAt}");
125 }
126 ```
127
128 ```go Go
129 client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))
130
131 cases := client.Beta.Compliance.Review.Cases.ListAutoPaging(
132 context.Background(),
133 anthropic.BetaComplianceReviewCaseListParams{
134 UpdatedAtGte: anthropic.Time(time.Date(2026, time.November, 23, 18, 15, 34, 0, time.UTC)),
135 OrderBy: anthropic.BetaComplianceReviewCaseOrderByUpdatedAt,
136 Order: anthropic.BetaComplianceReviewOrderAsc,
137 Limit: anthropic.Int(100),
138 },
139 )
140
141 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
142 for cases.Next() {
143 reviewCase := cases.Current()
144 fmt.Println(reviewCase.ID, reviewCase.Status.Type, reviewCase.UpdatedAt)
145 }
146 if err := cases.Err(); err != nil {
147 log.Fatal(err)
148 }
149 ```
150
151 ```java Java
152 import com.anthropic.models.beta.compliance.review.BetaComplianceReviewOrder;
153 import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewCaseOrderBy;
154 import com.anthropic.models.beta.compliance.review.cases.CaseListParams;
155 import java.time.OffsetDateTime;
156
157 void main() {
158 AnthropicClient client = AnthropicOkHttpClient.builder()
159 .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
160 .build();
161
162 var params = CaseListParams.builder()
163 .updatedAtGte(OffsetDateTime.parse("2026-11-23T18:15:34Z"))
164 .orderBy(BetaComplianceReviewCaseOrderBy.UPDATED_AT)
165 .order(BetaComplianceReviewOrder.ASC)
166 .limit(100)
167 .build();
168 var cases = client.beta().compliance().review().cases().list(params);
169
170 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
171 for (var reviewCase : cases.autoPager()) {
172 IO.println(reviewCase.id() + " " + reviewCase.status().type() + " " + reviewCase.updatedAt());
173 }
174 }
175 ```
176
177 ```php PHP
178 $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);
179
180 $cases = $client->beta->compliance->review->cases->list(
181 updatedAtGte: new \DateTimeImmutable('2026-11-23T18:15:34Z'),
182 orderBy: 'updated_at',
183 order: 'asc',
184 limit: 100,
185 );
186
187 // Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
188 foreach ($cases->pagingEachItem() as $case) {
189 echo $case->id, ' ', $case->status->type, ' ', $case->updatedAt->format(\DateTimeInterface::ATOM), PHP_EOL;
190 }
191 ```
192
193 ```ruby Ruby
194 client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))
195
196 cases = client.beta.compliance.review.cases.list(
197 updated_at_gte: Time.utc(2026, 11, 23, 18, 15, 34),
198 order_by: :updated_at,
199 order: :asc,
200 limit: 100
201 )
202
203 # Automatically fetches more pages as needed, so `limit` sets the page size, not the total.
204 cases.auto_paging_each do |review_case|
205 puts "#{review_case.id} #{review_case.status.type} #{review_case.updated_at}"
206 end
207 ```
208</CodeGroup>
63209
64210```json Response
65211{
from line 308
162308
163309Fetch each `item_id` in `transcripts`. Whether you can read a message that you sent with a user profile depends on the key:
164310
165* **An Admin API key from the Claude Console** can’t read such a message. That request returns a 404 error. Anthropic writes the message’s [Transcript](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-case-files#transcript) to the workspace’s Case bucket, if it has one.
166* **Other keys** can read such a message in some organizations (see [Get access](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access)). With such a key, send the user profile’s ID in the `anthropic-user-profile-id` header. For any other message, leave the header out. A wrong or missing ID returns a 404 error, and so does an ID on a message that you sent with no user profile.
167
168```bash cURL
169curl --fail-with-body -sS \
170 "https://api.anthropic.com/v1/compliance/safeguards/items/msg_01XFDUDYJgAACzvnptvVoYEL" \
171 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
172 -H "anthropic-version: 2026-10-21"
173```
311* **A Console Admin API key** can’t read such a message. That request returns a 404 error. Anthropic writes the message’s [Transcript](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-case-files#transcript) to the workspace’s Case bucket, if it has one.
312* **Other keys** can read such a message in some organizations (see [Get access](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/safety-cases-api#get-access)). With such a key, send the user profile’s ID in the `anthropic-user-profile-id` header. For any other message, leave the header out. A missing ID or another user profile’s ID returns a 404 error, and so does an ID on a message that you sent with no user profile.
313
314<CodeGroup>
315 ```bash cURL
316 curl --fail-with-body -sS \
317 "https://api.anthropic.com/v1/compliance/review/items/msg_01XFDUDYJgAACzvnptvVoYEL" \
318 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
319 -H "anthropic-version: 2026-10-21"
320 ```
321
322 ```bash CLI
323 ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:items retrieve \
324 --item-id msg_01XFDUDYJgAACzvnptvVoYEL
325 ```
326
327 ```python Python
328 client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])
329
330 item = client.beta.compliance.review.items.retrieve("msg_01XFDUDYJgAACzvnptvVoYEL")
331
332 print(item.to_json())
333 ```
334
335 ```typescript TypeScript
336 const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });
337
338 const item = await client.beta.compliance.review.items.retrieve(
339 "msg_01XFDUDYJgAACzvnptvVoYEL"
340 );
341
342 console.log(JSON.stringify(item, null, 2));
343 ```
344
345 ```csharp C#
346 AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };
347
348 var item = await client.Beta.Compliance.Review.Items.Retrieve("msg_01XFDUDYJgAACzvnptvVoYEL");
349
350 Console.WriteLine(item);
351 ```
352
353 ```go Go
354 client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))
355
356 item, err := client.Beta.Compliance.Review.Items.Get(
357 context.Background(),
358 "msg_01XFDUDYJgAACzvnptvVoYEL",
359 anthropic.BetaComplianceReviewItemGetParams{},
360 )
361 if err != nil {
362 log.Fatal(err)
363 }
364
365 fmt.Println(item.RawJSON())
366 ```
367
368 ```java Java
369 AnthropicClient client = AnthropicOkHttpClient.builder()
370 .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
371 .build();
372
373 var item = client.beta().compliance().review().items().retrieve("msg_01XFDUDYJgAACzvnptvVoYEL");
374
375 IO.println(item);
376 ```
377
378 ```php PHP
379 $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);
380
381 $item = $client->beta->compliance->review->items->retrieve('msg_01XFDUDYJgAACzvnptvVoYEL');
382
383 echo json_encode($item, JSON_PRETTY_PRINT), PHP_EOL;
384 ```
385
386 ```ruby Ruby
387 client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))
388
389 item = client.beta.compliance.review.items.retrieve("msg_01XFDUDYJgAACzvnptvVoYEL")
390
391 puts item.to_json
392 ```
393</CodeGroup>
174394
175395The response holds the message and the sender that Anthropic recorded:
176396
177397```json Response
178398{
179 "type": "compliance_safeguards_review_item",
399 "type": "compliance_review_item",
180400 "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
181 "organization_uuid": "abcdef01-2345-6789-abcd-ef0123456789",
182 "sampled_at": "2026-11-23T17:58:12.482913Z",
401 "organization_id": "abcdef01-2345-6789-abcd-ef0123456789",
402 "created_at": "2026-11-23T17:58:12.482913Z",
183403 "content_expires_at": "2026-12-21T17:58:12.482913Z",
184 "product_surface": "api",
185 "model": "claude-opus-5-5",
186404 "workspace_id": "wrkspc_01AbCdEfGhJkLmNpQrStUvWx",
187 "api_key_id": null,
188 "user": { "id": "user_01JkWm4Rt7YpXc2NvBq9sZdH", "email_address": "[email protected]" },
405 "actor": {
406 "type": "user_actor",
407 "user_id": "user_01JkWm4Rt7YpXc2NvBq9sZdH",
408 "email_address": "[email protected]"
409 },
189410 "user_profile_id": null,
190 "refs": {
191 "batch_id": null,
192 "local_session_id": null,
193 "claude_chat_id": null,
194 "claude_chat_message_id": null,
195 "remote_session_id": null,
196 "remote_session_event_id": null,
197 "agent_session_id": null
198 },
199 "content": {
200 "request": {
201 "model": "claude-opus-5-5",
202 "max_tokens": 1024,
203 "messages": [{ "role": "user", "content": "Hello, Claude" }]
411 "read_reason": { "type": "safeguards_review" },
412 "details": {
413 "type": "message",
414 "model": "claude-opus-5-5",
415 "content": {
416 "type": "create_message",
417 "request": {
418 "model": "claude-opus-5-5",
419 "max_tokens": 1024,
420 "messages": [{ "role": "user", "content": "Hello, Claude" }]
421 },
422 "response": {
423 "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
424 "type": "message",
425 "role": "assistant",
426 "content": [{ "type": "text", "text": "Hello! How can I help you today?" }]
427 }
204428 },
205 "response": {
206 "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
207 "type": "message",
208 "role": "assistant",
209 "content": [{ "type": "text", "text": "Hello! How can I help you today?" }]
210 }
211 },
212 "content_unavailable_reason": null
429 "content_unavailable_reason": null
430 }
213431}
214432```
215433
216`content` holds the stored request and response. It’s not an exact copy: Anthropic cuts some URLs to their host, redacts MCP server tokens, removes thinking blocks, and can replace an image or a document with resized images or a placeholder.
217
218Anthropic records one sender for each message:
219
220| Sender | `user` | `api_key_id` |
221| ----- | ----- | ----- |
222| A [personal key](https://platform.claude.com/docs/en/manage-claude/authentication#key-types) or a user’s sign-in | The account’s ID and email address | `null` |
223| A workspace key | `null` | The key’s ID |
224| A service account, or no sender recorded | `null` | `null` |
225
226`user` identifies the account, not the person who wrote the prompt. To find that person, use your own logs (see [Log message IDs](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#log-message-ids)). `email_address` is always `null` in an organization with no parent organization, and it can be `null` in others.
434`details.content` holds the stored request and response. It’s not an exact copy: Anthropic cuts some URLs to their host, redacts MCP server tokens, removes thinking blocks, and can replace an image or a document with resized images or a placeholder. `details.content.response` is `null` if no response was stored.
435
436Anthropic records one sender for each message, in `actor`:
437
438| Sender | `actor` |
439| ----- | ----- |
440| A [personal key](https://platform.claude.com/docs/en/manage-claude/api-keys#key-types) or a user’s sign-in | A `user_actor`, with the account’s `user_id` and `email_address` |
441| A workspace key | An `api_actor`, with the key’s `api_key_id` |
442| A service account | A `service_account_actor`, with its `service_account_id` |
443| No sender recorded | `null` |
444
445A `user_actor` identifies the account, not the person who wrote the prompt. To find that person, use your own logs (see [Log message IDs](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#log-message-ids)). `email_address` is always `null` in an organization with no parent organization, and it can be `null` in others.
446
447Anthropic can add other `actor`, `read_reason`, and `content_unavailable_reason` types, so accept the ones you don’t know.
227448
228449A Safety Case can list a message that you can’t read. This table shows what the request can return:
229450
from line 452
231452| ----- | ----- | ----- |
232453| A 404 error | For example, the message has expired or is no longer flagged. | A 404 error can be temporary, so try again later before you treat a message as unreadable. |
233454| A 404 error for every message | This happens if Anthropic hasn’t turned on message reads for your organization, or if your organization no longer has Anthropic’s approval to turn off Anthropic Human Review. | See [Reach out for help](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#get-help). A 404 error can be temporary, so try again later before you treat a message as unreadable. |
234| A 503 error | The error can be temporary. | Try again later before you treat a message as unreadable. |
235| The message, with `content` set to `null` | Anthropic has no copy of the text. `content_unavailable_reason` is `not_captured` or `use_ref`, and Anthropic can add values. | With `use_ref`, `refs` can hold an ID that names the conversation. Read the conversation through the Compliance API endpoint for that ID, with a key that has access to it. |
236
237Read and save each message as soon as the Safety Case arrives, and no later than `content_expires_at`. That time is at most 28 days after `sampled_at`, and an open Safety Case doesn’t extend it. A message can stop being readable before that time.
455| A 503 error | The error can be temporary. | Try again later before you treat a message as unreadable. If the error continues and the workspace has a customer-managed key, check that key. |
456| A 400 error with `error.details.error_code` set to `cmek_key_disabled`, `storage_bucket_unreadable`, or `customer_storage_refusal_unattributed` | Your customer-managed key refused the read, your bucket refused it, or Anthropic can’t tell which. | See [`cmek_key_disabled`](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting#cmek-key-disabled) or [If your bucket stops working](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/external-storage-manage#if-your-bucket-stops-working), then try again. If nothing changed on your side, see [Reach out for help](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#get-help). |
457| The message, with `details.content` set to `null` | Anthropic can’t return the text. `details.content_unavailable_reason.type` is `not_captured` if no copy was stored, or `stored_copy_unavailable` if Anthropic can’t return the stored copy. `details.model` can be `null` too. | Use your own logs (see [Log message IDs](https://platform.claude.com/docs/en/manage-claude/enterprise-frontier-safeguards/flagged-cases#log-message-ids)). |
458
459Read and save each message as soon as the Safety Case arrives, and no later than `content_expires_at`. That time is at most 28 days after `created_at`, and an open Safety Case doesn’t extend it. A message can stop being readable before that time.
238460
239461## Respond to a Safety Case
240462
from line 468
246468
247469Send one request within 7 calendar days of the Safety Case’s `created_at`:
248470
249```bash cURL
250curl --fail-with-body -sS \
251 "https://api.anthropic.com/v1/compliance/review/cases/rvc_01Hq3Zt8KpWv5NcR2yLbXs7D/respond" \
252 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
253 -H "anthropic-version: 2026-10-21" \
254 -H "content-type: application/json" \
255 -d '{
256 "determination": "violation",
257 "policy_categories": ["cyber"]
258 }'
259```
471<CodeGroup>
472 ```bash cURL
473 curl --fail-with-body -sS \
474 "https://api.anthropic.com/v1/compliance/review/cases/rvc_01Hq3Zt8KpWv5NcR2yLbXs7D/respond" \
475 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
476 -H "anthropic-version: 2026-10-21" \
477 -H "content-type: application/json" \
478 -d '{
479 "determination": "violation",
480 "policy_categories": ["cyber"]
481 }'
482 ```
483
484 ```bash CLI
485 ANTHROPIC_API_KEY="$ANTHROPIC_ADMIN_KEY" ant beta:compliance:review:cases respond \
486 --case-id rvc_01Hq3Zt8KpWv5NcR2yLbXs7D \
487 --determination violation \
488 --policy-category cyber
489 ```
490
491 ```python Python
492 client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_ADMIN_KEY"])
493
494 case = client.beta.compliance.review.cases.respond(
495 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
496 determination="violation",
497 policy_categories=["cyber"],
498 )
499
500 print(case.status.type)
501 ```
502
503 ```typescript TypeScript
504 const client = new Anthropic({ apiKey: process.env.ANTHROPIC_ADMIN_KEY });
505
506 const reviewCase = await client.beta.compliance.review.cases.respond(
507 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
508 { determination: "violation", policy_categories: ["cyber"] }
509 );
510
511 console.log(reviewCase.status.type);
512 ```
513
514 ```csharp C#
515 using Anthropic.Models.Beta.Compliance.Review.Cases;
516
517 AnthropicClient client = new() { ApiKey = Environment.GetEnvironmentVariable("ANTHROPIC_ADMIN_KEY") };
518
519 var reviewCase = await client.Beta.Compliance.Review.Cases.Respond(
520 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
521 new()
522 {
523 Determination = BetaComplianceReviewDetermination.Violation,
524 PolicyCategories = [BetaComplianceReviewViolatedPolicyCategory.Cyber],
525 }
526 );
527
528 Console.WriteLine(reviewCase.Status.Type.Raw());
529 ```
530
531 ```go Go
532 client := anthropic.NewClient(option.WithAPIKey(os.Getenv("ANTHROPIC_ADMIN_KEY")))
533
534 reviewCase, err := client.Beta.Compliance.Review.Cases.Respond(
535 context.Background(),
536 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
537 anthropic.BetaComplianceReviewCaseRespondParams{
538 Determination: anthropic.BetaComplianceReviewDeterminationViolation,
539 PolicyCategories: []anthropic.BetaComplianceReviewViolatedPolicyCategory{
540 anthropic.BetaComplianceReviewViolatedPolicyCategoryCyber,
541 },
542 },
543 )
544 if err != nil {
545 log.Fatal(err)
546 }
547
548 fmt.Println(reviewCase.Status.Type)
549 ```
550
551 ```java Java
552 import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewDetermination;
553 import com.anthropic.models.beta.compliance.review.cases.BetaComplianceReviewViolatedPolicyCategory;
554 import com.anthropic.models.beta.compliance.review.cases.CaseRespondParams;
555
556 void main() {
557 AnthropicClient client = AnthropicOkHttpClient.builder()
558 .apiKey(System.getenv("ANTHROPIC_ADMIN_KEY"))
559 .build();
560
561 var params = CaseRespondParams.builder()
562 .caseId("rvc_01Hq3Zt8KpWv5NcR2yLbXs7D")
563 .determination(BetaComplianceReviewDetermination.VIOLATION)
564 .addPolicyCategory(BetaComplianceReviewViolatedPolicyCategory.CYBER)
565 .build();
566 var reviewCase = client.beta().compliance().review().cases().respond(params);
567
568 IO.println(reviewCase.status().type());
569 }
570 ```
571
572 ```php PHP
573 $client = new Client(apiKey: getenv('ANTHROPIC_ADMIN_KEY') ?: null);
574
575 $case = $client->beta->compliance->review->cases->respond(
576 'rvc_01Hq3Zt8KpWv5NcR2yLbXs7D',
577 determination: 'violation',
578 policyCategories: ['cyber'],
579 );
580
581 echo $case->status->type, PHP_EOL;
582 ```
583
584 ```ruby Ruby
585 client = Anthropic::Client.new(api_key: ENV.fetch("ANTHROPIC_ADMIN_KEY"))
586
587 review_case = client.beta.compliance.review.cases.respond(
588 "rvc_01Hq3Zt8KpWv5NcR2yLbXs7D",
589 determination: :violation,
590 policy_categories: [:cyber]
591 )
592
593 puts review_case.status.type
594 ```
595</CodeGroup>
260596
261597`determination` is required, `policy_categories` is required with `violation`, and `verdicts` is optional:
262598
263599
No line in this hunk matches that.