Claude Platform Docs

Claves externas

Crear clave externa
$client->beta->organization->externalKeys->create(ProviderConfig providerConfig, ?string displayName, ?Geo geo): ExternalKey
POST/v1/organizations/external_keys

Crea una configuración de clave externa propiedad de la organización del llamador.

Listar claves externas
$client->beta->organization->externalKeys->list(?int limit, ?string page): PageCursor<ExternalKey>
GET/v1/organizations/external_keys

Lista las configuraciones de claves externas de la organización del llamador.

Obtener clave externa
$client->beta->organization->externalKeys->retrieve(string externalKeyID): ExternalKey
GET/v1/organizations/external_keys/{external_key_id}

Recupera por ID una única configuración de clave externa de la organización del llamador.

Actualizar clave externa
$client->beta->organization->externalKeys->update(string externalKeyID, ?string displayName, ?Geo geo, ?ProviderConfig providerConfig): ExternalKey
POST/v1/organizations/external_keys/{external_key_id}

Actualiza parcialmente una configuración de clave externa. Los campos omitidos no se modifican.

Eliminar clave externa
$client->beta->organization->externalKeys->delete(string externalKeyID): ExternalKeyDeleteResponse
DELETE/v1/organizations/external_keys/{external_key_id}

Elimina una configuración de clave externa.

Validar clave externa
$client->beta->organization->externalKeys->validate(string externalKeyID): ExternalKeyValidateResponse
POST/v1/organizations/external_keys/{external_key_id}/validate

Valida una configuración de clave externa contra el KMS del cliente.

Models
class AWSExternalKeyConfig { $type = 'aws'; $kmsARN; $region; $roleARN; }
"aws" type
string kmsARN

Full ARN of the AWS KMS key. On Claude Platform on AWS the key must be a single-Region key in your organization's own AWS account; cross-account keys, multi-Region keys, and alias ARNs are rejected.

?string region

AWS region. Derived from kms_arn if omitted.

?string roleARNDeprecated

IAM role ARN. Deprecated — Anthropic reaches the KMS key through its own intermediate role (or, on Claude Platform on AWS, with credentials AWS issues for the Workspace); this field is ignored.

class AzureExternalKeyConfig { $type = 'azure'; $keyName; $tenantID; /* 2 more */ }
"azure" type
string keyName

Name of the key within the vault.

string tenantID

Azure AD tenant ID.

string vaultURI

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

?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 AzureExternalKeyConfigParam { $type = 'azure'; $keyName; $tenantID; /* 2 more */ }
"azure" type
string keyName

Name of the key within the vault.

string tenantID

Azure AD tenant ID.

string vaultURI

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

?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 ExternalKey { $type = 'external_key'; $id; $attachment; /* 5 more */ }
"external_key" type
string id

Identifier of the external key config. A tagged ID prefixed ekey_, or — for organizations on the Claude Platform on AWS — the AWS KMS key ARN.

Attachment attachment

Whether any workspace uses this config to encrypt its data — counting live and archived workspaces (an archived workspace's data remains encrypted under the config), excluding deleted ones. Only an attached config is used by the encryption path; an unattached config is inert and can be deleted.

\Datetime createdAt
?string displayName

Human-friendly display name. Null if none was set.

string geo

Data residency geo. Selects which regional validator handles this key's encrypt/decrypt roundtrips.

ProviderConfig providerConfig

KMS provider identity and auth coordinates.

\Datetime updatedAt
class ExternalKeyAttachedAttachment { $type = 'attached'; }
"attached" type
class ExternalKeyUnattachedAttachment { $type = 'unattached'; }
"unattached" type
class GCPExternalKeyConfig { $type = 'gcp'; $keyName; }
"gcp" type
string keyName

Full resource name of the Cloud KMS key.