Claude Platform Docs

External Keys

Create External Key
beta.organization.external_keys.create(**kwargs) -> BetaExternalKey
POST/v1/organizations/external_keys
List External Keys
beta.organization.external_keys.list(**kwargs) -> PageCursor<BetaExternalKey>
GET/v1/organizations/external_keys
Get External Key
beta.organization.external_keys.retrieve(external_key_id) -> BetaExternalKey
GET/v1/organizations/external_keys/{external_key_id}
Update External Key
beta.organization.external_keys.update(external_key_id, **kwargs) -> BetaExternalKey
POST/v1/organizations/external_keys/{external_key_id}
Delete External Key
beta.organization.external_keys.delete(external_key_id) -> ExternalKeyDeleteResponse
DELETE/v1/organizations/external_keys/{external_key_id}
Validate External Key
beta.organization.external_keys.validate(external_key_id) -> ExternalKeyValidateResponse
POST/v1/organizations/external_keys/{external_key_id}/validate
Models
class BetaAWSExternalKeyConfig { kms_arn, type, region, role_arn }
kms_arn: String

Full ARN of the AWS KMS key.

maxLength2048
type: :aws
region: String

AWS region. Derived from kms_arn if omitted.

role_arn: StringDeprecated

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

class BetaAzureExternalKeyConfig { key_name, tenant_id, type, 2 more }
key_name: String

Name of the key within the vault.

tenant_id: String

Azure AD tenant ID.

type: :azure
vault_uri: String

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

client_id: String

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 { key_name, tenant_id, type, 2 more }

Azure Key Vault provider configuration.

key_name: String

Name of the key within the vault.

tenant_id: String

Azure AD tenant ID.

type: :azure
vault_uri: String

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

client_id: String

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 { id, attachment, created_at, 5 more }

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 }
type: :attached
class BetaExternalKeyUnattachedAttachment { type }
type: :unattached
class BetaGCPExternalKeyConfig { key_name, type }
key_name: String

Full resource name of the Cloud KMS key.

type: :gcp
class ExternalKeyDeleteResponse { id, type }
id: String

ID of the deleted External Key.

type: :external_key_deleted
class ExternalKeyValidateResponse { error, status, type }

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: String

Error message when status is failure. Null otherwise.

status: :failure | :success

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

One of the following:
:failure
:success
type: :external_key_validation