Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
One change · api

cmek-azure-key-vault changed

manage-claude/cmek-azure-key-vault

Nearest release: v2.1.277, published 4 hours before 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+415added
Lines−393removed
From line 143 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits5to this page, all time

The whole hunk

from line 143, old and new numbered
/
lines

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 143
143143 
144144<Tabs>
145145 <Tab title="Claude Platform">
146 <Steps>
147 <Step title="Register the key with Anthropic">
148 Create an external key configuration through the Admin API.
149 
150 <CodeGroup>
151 ```bash cURL
152 curl -sS "https://api.anthropic.com/v1/organizations/external_keys" \
153 -H "x-api-key: $ANTHROPIC_API_KEY" \
154 -H "anthropic-version: 2023-06-01" \
155 -H "content-type: application/json" \
156 -d '{
157 "display_name": "<friendly-name>",
158 "geo": "us",
159 "provider_config": {
160 "type": "azure",
161 "vault_uri": "https://<your-vault-name>.vault.azure.net/",
162 "key_name": "<your-key-name>",
163 "tenant_id": "<your-tenant-id>"
146 You can set up the key in the Claude Console or through the Admin API, with the same result.
147 
148 <Tabs>
149 <Tab title="Claude Console">
150 <Steps>
151 <Step title="Register the key with Anthropic">
152 In the Claude Console, open **Settings > Encryption keys** and click **Add key**. Enter a display name, choose **Azure Key Vault**, and click **Continue**. Fill in **Vault URI**, **Key name**, and **Tenant ID**, and click **Add**.
153 </Step>
154 
155 <Step title="Validate the key">
156 On the **Encryption keys** page, click **Verify** next to the key. **Connected** appears when the check passes. If it fails, a message gives the reason.
157 </Step>
158 
159 <Step title="Attach the key to a workspace">
160 Open **Settings > Workspaces**, choose the workspace, and open its **Security** tab. Under **Encryption key**, select the key, click **Save**, and confirm. Attaching a key can't be undone. For a workspace that already receives requests, the key can take [up to a day to take effect](https://platform.claude.com/docs/en/manage-claude/cmek#how-it-works).
161 </Step>
162 </Steps>
163 </Tab>
164 
165 <Tab title="API">
166 <Steps>
167 <Step title="Register the key with Anthropic">
168 Create an external key configuration through the Admin API.
169 
170 <CodeGroup>
171 ```bash cURL
172 curl -sS "https://api.anthropic.com/v1/organizations/external_keys" \
173 -H "x-api-key: $ANTHROPIC_API_KEY" \
174 -H "anthropic-version: 2023-06-01" \
175 -H "content-type: application/json" \
176 -d '{
177 "display_name": "<friendly-name>",
178 "geo": "us",
179 "provider_config": {
180 "type": "azure",
181 "vault_uri": "https://<your-vault-name>.vault.azure.net/",
182 "key_name": "<your-key-name>",
183 "tenant_id": "<your-tenant-id>"
184 }
185 }'
186 ```
187 
188 ```bash CLI
189 ant beta:organization:external-keys create <<'YAML'
190 display_name: "<friendly-name>"
191 geo: us
192 provider_config:
193 type: azure
194 vault_uri: "https://<your-vault-name>.vault.azure.net/"
195 key_name: "<your-key-name>"
196 tenant_id: "<your-tenant-id>"
197 YAML
198 ```
199 
200 ```python Python
201 client = anthropic.Anthropic()
202 
203 external_key = client.beta.organization.external_keys.create(
204 display_name="<friendly-name>",
205 geo="us",
206 provider_config={
207 "type": "azure",
208 "vault_uri": "https://<your-vault-name>.vault.azure.net/",
209 "key_name": "<your-key-name>",
210 "tenant_id": "<your-tenant-id>",
211 },
212 )
213 
214 print(f"id: {external_key.id}")
215 print(f"display_name: {external_key.display_name}")
216 ```
217 
218 ```typescript TypeScript
219 const client = new Anthropic();
220 
221 const externalKey = await client.beta.organization.externalKeys.create({
222 display_name: "<friendly-name>",
223 geo: "us",
224 provider_config: {
225 type: "azure",
226 vault_uri: "https://<your-vault-name>.vault.azure.net/",
227 key_name: "<your-key-name>",
228 tenant_id: "<your-tenant-id>"
229 }
230 });
231 
232 console.log(`id: ${externalKey.id}`);
233 console.log(`display_name: ${externalKey.display_name}`);
234 ```
235 
236 ```csharp C#
237 using Anthropic.Models.Beta.Organization.ExternalKeys;
238 
239 AnthropicClient client = new();
240 
241 var externalKey = await client.Beta.Organization.ExternalKeys.Create(new()
242 {
243 DisplayName = "<friendly-name>",
244 Geo = Geo.Us,
245 ProviderConfig = new BetaAzureExternalKeyConfigParam
246 {
247 VaultUri = "https://<your-vault-name>.vault.azure.net/",
248 KeyName = "<your-key-name>",
249 TenantID = "<your-tenant-id>"
250 }
251 });
252 
253 Console.WriteLine($"id: {externalKey.ID}");
254 Console.WriteLine($"display_name: {externalKey.DisplayName}");
255 ```
256 
257 ```go Go
258 client := anthropic.NewClient()
259 
260 externalKey, err := client.Beta.Organization.ExternalKeys.New(context.Background(), anthropic.BetaOrganizationExternalKeyNewParams{
261 DisplayName: anthropic.String("<friendly-name>"),
262 Geo: anthropic.BetaOrganizationExternalKeyNewParamsGeoUs,
263 ProviderConfig: anthropic.BetaOrganizationExternalKeyNewParamsProviderConfigUnion{
264 OfAzure: &anthropic.BetaAzureExternalKeyConfigParam{
265 VaultURI: "https://<your-vault-name>.vault.azure.net/",
266 KeyName: "<your-key-name>",
267 TenantID: "<your-tenant-id>",
268 },
269 },
270 })
271 if err != nil {
272 log.Fatal(err)
164273 }
165 }'
166 ```
167 
168 ```bash CLI
169 ant beta:organization:external-keys create <<'YAML'
170 display_name: "<friendly-name>"
171 geo: us
172 provider_config:
173 type: azure
174 vault_uri: "https://<your-vault-name>.vault.azure.net/"
175 key_name: "<your-key-name>"
176 tenant_id: "<your-tenant-id>"
177 YAML
178 ```
179 
180 ```python Python
181 client = anthropic.Anthropic()
182 
183 external_key = client.beta.organization.external_keys.create(
184 display_name="<friendly-name>",
185 geo="us",
186 provider_config={
187 "type": "azure",
188 "vault_uri": "https://<your-vault-name>.vault.azure.net/",
189 "key_name": "<your-key-name>",
190 "tenant_id": "<your-tenant-id>",
191 },
192 )
193 
194 print(f"id: {external_key.id}")
195 print(f"display_name: {external_key.display_name}")
196 ```
197 
198 ```typescript TypeScript
199 const client = new Anthropic();
200 
201 const externalKey = await client.beta.organization.externalKeys.create({
202 display_name: "<friendly-name>",
203 geo: "us",
204 provider_config: {
205 type: "azure",
206 vault_uri: "https://<your-vault-name>.vault.azure.net/",
207 key_name: "<your-key-name>",
208 tenant_id: "<your-tenant-id>"
274 
275 fmt.Printf("id: %s\n", externalKey.ID)
276 fmt.Printf("display_name: %s\n", externalKey.DisplayName)
277 ```
278 
279 ```java Java
280 import com.anthropic.models.beta.organization.externalkeys.BetaAzureExternalKeyConfigParam;
281 import com.anthropic.models.beta.organization.externalkeys.ExternalKeyCreateParams;
282 
283 void main() {
284 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
285 
286 var params = ExternalKeyCreateParams.builder()
287 .displayName("<friendly-name>")
288 .geo(ExternalKeyCreateParams.Geo.US)
289 .providerConfig(BetaAzureExternalKeyConfigParam.builder()
290 .vaultUri("https://<your-vault-name>.vault.azure.net/")
291 .keyName("<your-key-name>")
292 .tenantId("<your-tenant-id>")
293 .build())
294 .build();
295 var externalKey = client.beta().organization().externalKeys().create(params);
296 
297 IO.println("id: " + externalKey.id());
298 IO.println("display_name: " + externalKey.displayName().orElseThrow());
299 }
300 ```
301 
302 ```php PHP
303 use Anthropic\Beta\Organization\ExternalKeys\ExternalKeyCreateParams\Geo;
304 // ...
305 
306 $client = new Client();
307 
308 $externalKey = $client->beta->organization->externalKeys->create(
309 displayName: '<friendly-name>',
310 geo: Geo::US,
311 providerConfig: [
312 'type' => 'azure',
313 'vaultURI' => 'https://<your-vault-name>.vault.azure.net/',
314 'keyName' => '<your-key-name>',
315 'tenantID' => '<your-tenant-id>',
316 ],
317 );
318 
319 echo "id: {$externalKey->id}\n";
320 echo "display_name: {$externalKey->displayName}\n";
321 ```
322 
323 ```ruby Ruby
324 client = Anthropic::Client.new
325 
326 external_key = client.beta.organization.external_keys.create(
327 display_name: "<friendly-name>",
328 geo: :us,
329 provider_config: {
330 type: :azure,
331 vault_uri: "https://<your-vault-name>.vault.azure.net/",
332 key_name: "<your-key-name>",
333 tenant_id: "<your-tenant-id>"
334 }
335 )
336 
337 puts "id: #{external_key.id}"
338 puts "display_name: #{external_key.display_name}"
339 ```
340 </CodeGroup>
341 
342 The response contains the external key ID:
343 
344 ```json
345 {
346 "type": "external_key",
347 "id": "ekey_<id>",
348 "display_name": "<friendly-name>"
209349 }
210 });
211 
212 console.log(`id: ${externalKey.id}`);
213 console.log(`display_name: ${externalKey.display_name}`);
214 ```
215 
216 ```csharp C#
217 using Anthropic.Models.Beta.Organization.ExternalKeys;
218 
219 AnthropicClient client = new();
220 
221 var externalKey = await client.Beta.Organization.ExternalKeys.Create(new()
222 {
223 DisplayName = "<friendly-name>",
224 Geo = Geo.Us,
225 ProviderConfig = new BetaAzureExternalKeyConfigParam
350 ```
351 </Step>
352 
353 <Step title="Validate the key">
354 Trigger an encrypt and decrypt round-trip against your key. This confirms that Anthropic can authenticate to your tenant and perform wrap and unwrap operations.
355 
356 <CodeGroup>
357 ```bash cURL
358 curl -sS -X POST "https://api.anthropic.com/v1/organizations/external_keys/ekey_<id>/validate" \
359 -H "x-api-key: $ANTHROPIC_API_KEY" \
360 -H "anthropic-version: 2023-06-01"
361 ```
362 
363 ```bash CLI
364 ant beta:organization:external-keys validate --external-key-id "ekey_<id>"
365 ```
366 
367 ```python Python
368 client = anthropic.Anthropic()
369 
370 validation = client.beta.organization.external_keys.validate("ekey_<id>")
371 
372 print(f"status: {validation.status}")
373 print(f"error: {validation.error}")
374 ```
375 
376 ```typescript TypeScript
377 const client = new Anthropic();
378 
379 const validation = await client.beta.organization.externalKeys.validate("ekey_<id>");
380 
381 console.log(`status: ${validation.status}`);
382 console.log(`error: ${validation.error}`);
383 ```
384 
385 ```csharp C#
386 AnthropicClient client = new();
387 
388 var validation = await client.Beta.Organization.ExternalKeys.Validate("ekey_<id>");
389 
390 Console.WriteLine($"status: {validation.Status.Raw()}");
391 Console.WriteLine($"error: {validation.Error}");
392 ```
393 
394 ```go Go
395 client := anthropic.NewClient()
396 
397 validation, err := client.Beta.Organization.ExternalKeys.Validate(context.Background(), "ekey_<id>")
398 if err != nil {
399 log.Fatal(err)
400 }
401 
402 fmt.Printf("status: %s\n", validation.Status)
403 fmt.Printf("error: %s\n", validation.Error)
404 ```
405 
406 ```java Java
407 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
408 
409 var validation = client.beta().organization().externalKeys().validate("ekey_<id>");
410 
411 IO.println("status: " + validation.status().asString());
412 IO.println("error: " + validation.error().orElse(""));
413 ```
414 
415 ```php PHP
416 $client = new Client();
417 
418 $validation = $client->beta->organization->externalKeys->validate(
419 externalKeyID: 'ekey_<id>',
420 );
421 
422 echo "status: {$validation->status}\n";
423 echo "error: {$validation->error}\n";
424 ```
425 
426 ```ruby Ruby
427 client = Anthropic::Client.new
428 
429 validation = client.beta.organization.external_keys.validate("ekey_<id>")
430 
431 puts "status: #{validation.status}"
432 puts "error: #{validation.error}"
433 ```
434 </CodeGroup>
435 
436 A successful response looks like this:
437 
438 ```json
439 { "type": "external_key_validation", "status": "success", "error": null }
440 ```
441 
442 If validation fails, the `error` field describes the problem. Common causes are:
443 
444 * **RBAC propagation delay:** role assignments can take a few minutes to take effect. Wait and retry.
445 * **Network ACLs blocking Anthropic:** confirm public network access and `ipRules` as described in the verification step.
446 * **Conditional access policies on workload identities:** if your tenant has conditional access policies that target service principals, exclude the Anthropic service principal or add Anthropic's egress ranges to the policy's named locations.
447 </Step>
448 
449 <Step title="Attach the key to a workspace">
450 Once the key is validated, attach it to a new workspace before you send any requests to that workspace. For a workspace that already receives requests, the key can take [up to a day to take effect](https://platform.claude.com/docs/en/manage-claude/cmek#how-it-works).
451 
452 <CodeGroup>
453 ```bash cURL
454 curl -sS -X POST "https://api.anthropic.com/v1/organizations/workspaces/<workspace-id>" \
455 -H "x-api-key: $ANTHROPIC_API_KEY" \
456 -H "anthropic-version: 2023-06-01" \
457 -H "content-type: application/json" \
458 -d '{
459 "external_key_id": "ekey_<id>"
460 }'
461 ```
462 
463 ```bash CLI
464 ant beta:organization:workspaces update \
465 --workspace-id "<workspace-id>" \
466 --external-key-id "ekey_<id>"
467 ```
468 
469 ```python Python
470 client = anthropic.Anthropic()
471 
472 workspace = client.beta.organization.workspaces.update(
473 "<workspace-id>", external_key_id="ekey_<id>"
474 )
475 
476 print(f"id: {workspace.id}")
477 print(f"external_key_id: {workspace.external_key_id}")
478 ```
479 
480 ```typescript TypeScript
481 const client = new Anthropic();
482 
483 const workspace = await client.beta.organization.workspaces.update("<workspace-id>", {
484 external_key_id: "ekey_<id>"
485 });
486 
487 console.log(`id: ${workspace.id}`);
488 console.log(`external_key_id: ${workspace.external_key_id}`);
489 ```
490 
491 ```csharp C#
492 AnthropicClient client = new();
493 
494 var workspace = await client.Beta.Organization.Workspaces.Update("<workspace-id>", new()
226495 {
227 VaultUri = "https://<your-vault-name>.vault.azure.net/",
228 KeyName = "<your-key-name>",
229 TenantID = "<your-tenant-id>"
496 ExternalKeyID = "ekey_<id>"
497 });
498 
499 Console.WriteLine($"id: {workspace.ID}");
500 Console.WriteLine($"external_key_id: {workspace.ExternalKeyID}");
501 ```
502 
503 ```go Go
504 client := anthropic.NewClient()
505 
506 workspace, err := client.Beta.Organization.Workspaces.Update(
507 context.Background(),
508 "<workspace-id>",
509 anthropic.BetaOrganizationWorkspaceUpdateParams{
510 ExternalKeyID: anthropic.String("ekey_<id>"),
511 },
512 )
513 if err != nil {
514 log.Fatal(err)
230515 }
231 });
232 
233 Console.WriteLine($"id: {externalKey.ID}");
234 Console.WriteLine($"display_name: {externalKey.DisplayName}");
235 ```
236 
237 ```go Go
238 client := anthropic.NewClient()
239 
240 externalKey, err := client.Beta.Organization.ExternalKeys.New(context.Background(), anthropic.BetaOrganizationExternalKeyNewParams{
241 DisplayName: anthropic.String("<friendly-name>"),
242 Geo: anthropic.BetaOrganizationExternalKeyNewParamsGeoUs,
243 ProviderConfig: anthropic.BetaOrganizationExternalKeyNewParamsProviderConfigUnion{
244 OfAzure: &anthropic.BetaAzureExternalKeyConfigParam{
245 VaultURI: "https://<your-vault-name>.vault.azure.net/",
246 KeyName: "<your-key-name>",
247 TenantID: "<your-tenant-id>",
248 },
249 },
250 })
251 if err != nil {
252 log.Fatal(err)
253 }
254 
255 fmt.Printf("id: %s\n", externalKey.ID)
256 fmt.Printf("display_name: %s\n", externalKey.DisplayName)
257 ```
258 
259 ```java Java
260 import com.anthropic.models.beta.organization.externalkeys.BetaAzureExternalKeyConfigParam;
261 import com.anthropic.models.beta.organization.externalkeys.ExternalKeyCreateParams;
262 
263 void main() {
264 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
265 
266 var params = ExternalKeyCreateParams.builder()
267 .displayName("<friendly-name>")
268 .geo(ExternalKeyCreateParams.Geo.US)
269 .providerConfig(BetaAzureExternalKeyConfigParam.builder()
270 .vaultUri("https://<your-vault-name>.vault.azure.net/")
271 .keyName("<your-key-name>")
272 .tenantId("<your-tenant-id>")
273 .build())
274 .build();
275 var externalKey = client.beta().organization().externalKeys().create(params);
276 
277 IO.println("id: " + externalKey.id());
278 IO.println("display_name: " + externalKey.displayName().orElseThrow());
279 }
280 ```
281 
282 ```php PHP
283 use Anthropic\Beta\Organization\ExternalKeys\ExternalKeyCreateParams\Geo;
284 // ...
285 
286 $client = new Client();
287 
288 $externalKey = $client->beta->organization->externalKeys->create(
289 displayName: '<friendly-name>',
290 geo: Geo::US,
291 providerConfig: [
292 'type' => 'azure',
293 'vaultURI' => 'https://<your-vault-name>.vault.azure.net/',
294 'keyName' => '<your-key-name>',
295 'tenantID' => '<your-tenant-id>',
296 ],
297 );
298 
299 echo "id: {$externalKey->id}\n";
300 echo "display_name: {$externalKey->displayName}\n";
301 ```
302 
303 ```ruby Ruby
304 client = Anthropic::Client.new
305 
306 external_key = client.beta.organization.external_keys.create(
307 display_name: "<friendly-name>",
308 geo: :us,
309 provider_config: {
310 type: :azure,
311 vault_uri: "https://<your-vault-name>.vault.azure.net/",
312 key_name: "<your-key-name>",
313 tenant_id: "<your-tenant-id>"
314 }
315 )
316 
317 puts "id: #{external_key.id}"
318 puts "display_name: #{external_key.display_name}"
319 ```
320 </CodeGroup>
321 
322 The response contains the external key ID:
323 
324 ```json
325 {
326 "type": "external_key",
327 "id": "ekey_<id>",
328 "display_name": "<friendly-name>"
329 }
330 ```
331 </Step>
332 
333 <Step title="Validate the key">
334 Trigger an encrypt and decrypt round-trip against your key. This confirms that Anthropic can authenticate to your tenant and perform wrap and unwrap operations.
335 
336 <CodeGroup>
337 ```bash cURL
338 curl -sS -X POST "https://api.anthropic.com/v1/organizations/external_keys/ekey_<id>/validate" \
339 -H "x-api-key: $ANTHROPIC_API_KEY" \
340 -H "anthropic-version: 2023-06-01"
341 ```
342 
343 ```bash CLI
344 ant beta:organization:external-keys validate --external-key-id "ekey_<id>"
345 ```
346 
347 ```python Python
348 client = anthropic.Anthropic()
349 
350 validation = client.beta.organization.external_keys.validate("ekey_<id>")
351 
352 print(f"status: {validation.status}")
353 print(f"error: {validation.error}")
354 ```
355 
356 ```typescript TypeScript
357 const client = new Anthropic();
358 
359 const validation = await client.beta.organization.externalKeys.validate("ekey_<id>");
360 
361 console.log(`status: ${validation.status}`);
362 console.log(`error: ${validation.error}`);
363 ```
364 
365 ```csharp C#
366 AnthropicClient client = new();
367 
368 var validation = await client.Beta.Organization.ExternalKeys.Validate("ekey_<id>");
369 
370 Console.WriteLine($"status: {validation.Status.Raw()}");
371 Console.WriteLine($"error: {validation.Error}");
372 ```
373 
374 ```go Go
375 client := anthropic.NewClient()
376 
377 validation, err := client.Beta.Organization.ExternalKeys.Validate(context.Background(), "ekey_<id>")
378 if err != nil {
379 log.Fatal(err)
380 }
381 
382 fmt.Printf("status: %s\n", validation.Status)
383 fmt.Printf("error: %s\n", validation.Error)
384 ```
385 
386 ```java Java
387 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
388 
389 var validation = client.beta().organization().externalKeys().validate("ekey_<id>");
390 
391 IO.println("status: " + validation.status().asString());
392 IO.println("error: " + validation.error().orElse(""));
393 ```
394 
395 ```php PHP
396 $client = new Client();
397 
398 $validation = $client->beta->organization->externalKeys->validate(
399 externalKeyID: 'ekey_<id>',
400 );
401 
402 echo "status: {$validation->status}\n";
403 echo "error: {$validation->error}\n";
404 ```
405 
406 ```ruby Ruby
407 client = Anthropic::Client.new
408 
409 validation = client.beta.organization.external_keys.validate("ekey_<id>")
410 
411 puts "status: #{validation.status}"
412 puts "error: #{validation.error}"
413 ```
414 </CodeGroup>
415 
416 A successful response looks like this:
417 
418 ```json
419 { "type": "external_key_validation", "status": "success", "error": null }
420 ```
421 
422 If validation fails, the `error` field describes the problem. Common causes are:
423 
424 * **RBAC propagation delay:** role assignments can take a few minutes to take effect. Wait and retry.
425 * **Network ACLs blocking Anthropic:** confirm public network access and `ipRules` as described in the verification step.
426 * **Conditional access policies on workload identities:** if your tenant has conditional access policies that target service principals, exclude the Anthropic service principal or add Anthropic's egress ranges to the policy's named locations.
427 </Step>
428 
429 <Step title="Attach the key to a workspace">
430 Once the key is validated, attach it to a new workspace before you send any requests to that workspace. For a workspace that already receives requests, the key can take [up to a day to take effect](https://platform.claude.com/docs/en/manage-claude/cmek#how-it-works).
431 
432 <CodeGroup>
433 ```bash cURL
434 curl -sS -X POST "https://api.anthropic.com/v1/organizations/workspaces/<workspace-id>" \
435 -H "x-api-key: $ANTHROPIC_API_KEY" \
436 -H "anthropic-version: 2023-06-01" \
437 -H "content-type: application/json" \
438 -d '{
439 "external_key_id": "ekey_<id>"
440 }'
441 ```
442 
443 ```bash CLI
444 ant beta:organization:workspaces update \
445 --workspace-id "<workspace-id>" \
446 --external-key-id "ekey_<id>"
447 ```
448 
449 ```python Python
450 client = anthropic.Anthropic()
451 
452 workspace = client.beta.organization.workspaces.update(
453 "<workspace-id>", external_key_id="ekey_<id>"
454 )
455 
456 print(f"id: {workspace.id}")
457 print(f"external_key_id: {workspace.external_key_id}")
458 ```
459 
460 ```typescript TypeScript
461 const client = new Anthropic();
462 
463 const workspace = await client.beta.organization.workspaces.update("<workspace-id>", {
464 external_key_id: "ekey_<id>"
465 });
466 
467 console.log(`id: ${workspace.id}`);
468 console.log(`external_key_id: ${workspace.external_key_id}`);
469 ```
470 
471 ```csharp C#
472 AnthropicClient client = new();
473 
474 var workspace = await client.Beta.Organization.Workspaces.Update("<workspace-id>", new()
475 {
476 ExternalKeyID = "ekey_<id>"
477 });
478 
479 Console.WriteLine($"id: {workspace.ID}");
480 Console.WriteLine($"external_key_id: {workspace.ExternalKeyID}");
481 ```
482 
483 ```go Go
484 client := anthropic.NewClient()
485 
486 workspace, err := client.Beta.Organization.Workspaces.Update(
487 context.Background(),
488 "<workspace-id>",
489 anthropic.BetaOrganizationWorkspaceUpdateParams{
490 ExternalKeyID: anthropic.String("ekey_<id>"),
491 },
492 )
493 if err != nil {
494 log.Fatal(err)
495 }
496 
497 fmt.Printf("id: %s\n", workspace.ID)
498 fmt.Printf("external_key_id: %s\n", workspace.ExternalKeyID)
499 ```
500 
501 ```java Java
502 import com.anthropic.models.beta.organization.workspaces.WorkspaceUpdateParams;
503 
504 void main() {
505 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
506 
507 var params = WorkspaceUpdateParams.builder()
508 .externalKeyId("ekey_<id>")
509 .build();
510 var workspace = client.beta().organization().workspaces().update("<workspace-id>", params);
511 
512 IO.println("id: " + workspace.id());
513 IO.println("external_key_id: " + workspace.externalKeyId().orElseThrow());
514 }
515 ```
516 
517 ```php PHP
518 $client = new Client();
519 
520 $workspace = $client->beta->organization->workspaces->update(
521 workspaceID: '<workspace-id>',
522 externalKeyID: 'ekey_<id>',
523 );
524 
525 echo "id: {$workspace->id}\n";
526 echo "external_key_id: {$workspace->externalKeyID}\n";
527 ```
528 
529 ```ruby Ruby
530 client = Anthropic::Client.new
531 
532 workspace = client.beta.organization.workspaces.update(
533 "<workspace-id>",
534 external_key_id: "ekey_<id>"
535 )
536 
537 puts "id: #{workspace.id}"
538 puts "external_key_id: #{workspace.external_key_id}"
539 ```
540 </CodeGroup>
541 </Step>
542 </Steps>
516 
517 fmt.Printf("id: %s\n", workspace.ID)
518 fmt.Printf("external_key_id: %s\n", workspace.ExternalKeyID)
519 ```
520 
521 ```java Java
522 import com.anthropic.models.beta.organization.workspaces.WorkspaceUpdateParams;
523 
524 void main() {
525 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
526 
527 var params = WorkspaceUpdateParams.builder()
528 .externalKeyId("ekey_<id>")
529 .build();
530 var workspace = client.beta().organization().workspaces().update("<workspace-id>", params);
531 
532 IO.println("id: " + workspace.id());
533 IO.println("external_key_id: " + workspace.externalKeyId().orElseThrow());
534 }
535 ```
536 
537 ```php PHP
538 $client = new Client();
539 
540 $workspace = $client->beta->organization->workspaces->update(
541 workspaceID: '<workspace-id>',
542 externalKeyID: 'ekey_<id>',
543 );
544 
545 echo "id: {$workspace->id}\n";
546 echo "external_key_id: {$workspace->externalKeyID}\n";
547 ```
548 
549 ```ruby Ruby
550 client = Anthropic::Client.new
551 
552 workspace = client.beta.organization.workspaces.update(
553 "<workspace-id>",
554 external_key_id: "ekey_<id>"
555 )
556 
557 puts "id: #{workspace.id}"
558 puts "external_key_id: #{workspace.external_key_id}"
559 ```
560 </CodeGroup>
561 </Step>
562 </Steps>
563 </Tab>
564 </Tabs>
543565 </Tab>
544566 
545567 <Tab title="Claude Enterprise">
546568