Claude Platform Docs

External Keys

Create External Key
beta.organization.external_keys.create(ExternalKeyCreateParams**kwargs) -> BetaExternalKey
POST/v1/organizations/external_keys
List External Keys
beta.organization.external_keys.list(ExternalKeyListParams**kwargs) -> SyncPageCursor[BetaExternalKey]
GET/v1/organizations/external_keys
Get External Key
beta.organization.external_keys.retrieve(strexternal_key_id) -> BetaExternalKey
GET/v1/organizations/external_keys/{external_key_id}
Update External Key
beta.organization.external_keys.update(strexternal_key_id, ExternalKeyUpdateParams**kwargs) -> BetaExternalKey
POST/v1/organizations/external_keys/{external_key_id}
Delete External Key
beta.organization.external_keys.delete(strexternal_key_id) -> ExternalKeyDeleteResponse
DELETE/v1/organizations/external_keys/{external_key_id}
Validate External Key
beta.organization.external_keys.validate(strexternal_key_id) -> ExternalKeyValidateResponse
POST/v1/organizations/external_keys/{external_key_id}/validate
Models
class BetaAWSExternalKeyConfig:
kms_arn: str

Full ARN of the AWS KMS key.

maxLength2048
type: Literal["aws"]
region: Optional[str]

AWS region. Derived from kms_arn if omitted.

role_arn: Optional[str]Deprecated

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

class BetaAzureExternalKeyConfig:
key_name: str

Name of the key within the vault.

tenant_id: str

Azure AD tenant ID.

type: Literal["azure"]
vault_uri: str

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

client_id: Optional[str]

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.

key_name: str

Name of the key within the vault.

tenant_id: str

Azure AD tenant ID.

type: Literal["azure"]
vault_uri: str

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

client_id: Optional[str]

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:
type: Literal["attached"]
defaultattached
class BetaExternalKeyUnattachedAttachment:
type: Literal["unattached"]
defaultunattached
class BetaGCPExternalKeyConfig:
key_name: str

Full resource name of the Cloud KMS key.

type: Literal["gcp"]
class ExternalKeyDeleteResponse:
id: str

ID of the deleted External Key.

type: Literal["external_key_deleted"]
defaultexternal_key_deleted
class ExternalKeyValidateResponse:

Result of a validation roundtrip against the customer's KMS.

HTTP 200 for both outcomes — the operation completed; status says whether the key works.

error: Optional[str]

Error message when status is failure. Null otherwise.

status: Literal["failure", "success"]

success — encrypt/decrypt roundtrip succeeded. failure — the roundtrip failed or timed out; see error.

One of the following:
"failure"
"success"
type: Literal["external_key_validation"]
defaultexternal_key_validation