Claude Platform Docs

External Keys

Create External Key
BetaExternalKey beta().organization().externalKeys().create(ExternalKeyCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/organizations/external_keys
List External Keys
ExternalKeyListPage beta().organization().externalKeys().list(ExternalKeyListParamsparams = ExternalKeyListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/organizations/external_keys
Get External Key
BetaExternalKey beta().organization().externalKeys().retrieve(ExternalKeyRetrieveParamsparams = ExternalKeyRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/organizations/external_keys/{external_key_id}
Update External Key
BetaExternalKey beta().organization().externalKeys().update(ExternalKeyUpdateParamsparams = ExternalKeyUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/organizations/external_keys/{external_key_id}
Delete External Key
ExternalKeyDeleteResponse beta().organization().externalKeys().delete(ExternalKeyDeleteParamsparams = ExternalKeyDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/v1/organizations/external_keys/{external_key_id}
Validate External Key
ExternalKeyValidateResponse beta().organization().externalKeys().validate(ExternalKeyValidateParamsparams = ExternalKeyValidateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/organizations/external_keys/{external_key_id}/validate
Models
class BetaAwsExternalKeyConfig:
String kmsArn

Full ARN of the AWS KMS key.

maxLength2048
JsonValue type "aws"constant
Optional<String> region

AWS region. Derived from kms_arn if omitted.

Optional<String> roleArnDeprecated

IAM role ARN. Deprecated — Anthropic reaches the KMS key via a managed intermediate role; this field is ignored.

class BetaAzureExternalKeyConfig:
String keyName

Name of the key within the vault.

String tenantId

Azure AD tenant ID.

JsonValue type "azure"constant
String vaultUri

Key Vault data-plane URI — https://{vault-name}.vault.azure.net or https://{hsm-name}.managedhsm.azure.net.

Optional<String> clientId

Azure AD application (client) ID. Omit to use Anthropic's multitenant app. Provide only if using a single-tenant app registration in the customer's directory.

class BetaAzureExternalKeyConfigParam:

Azure Key Vault provider configuration.

String keyName

Name of the key within the vault.

String tenantId

Azure AD tenant ID.

JsonValue type "azure"constant
String vaultUri

Key Vault data-plane URI — https://{vault-name}.vault.azure.net or https://{hsm-name}.managedhsm.azure.net.

Optional<String> clientId

Azure AD application (client) ID. Omit to use Anthropic's multitenant app. Provide only if using a single-tenant app registration in the customer's directory.

class BetaExternalKey:

CMEK external key config belonging to the caller's organization.

Configs are organization-scoped. Workspaces attach to a config; once any workspace references it, the provider fields become effectively immutable (existing encrypted data needs the config for decrypt).

class BetaExternalKeyAttachedAttachment:
JsonValue type "attached"constant
class BetaExternalKeyUnattachedAttachment:
JsonValue type "unattached"constant
class BetaGcpExternalKeyConfig:
String keyName

Full resource name of the Cloud KMS key.

JsonValue type "gcp"constant