Claude Platform Docs

Chiavi esterne

Crea chiave esterna
client.organization.externalKeys.create(body, options?): ExternalKey
POST/v1/organizations/external_keys

Crea una configurazione di chiave esterna di proprietà dell'organizzazione del chiamante.

Elenca le chiavi esterne
client.organization.externalKeys.list(query?, options?): PageCursor<ExternalKey>
GET/v1/organizations/external_keys

Elenca le configurazioni di chiavi esterne nell'organizzazione del chiamante.

Ottieni chiave esterna
client.organization.externalKeys.retrieve(externalKeyID, options?): ExternalKey
GET/v1/organizations/external_keys/{external_key_id}

Recupera una singola configurazione di chiave esterna nell'organizzazione del chiamante tramite ID.

Aggiorna chiave esterna
client.organization.externalKeys.update(externalKeyID, body, options?): ExternalKey
POST/v1/organizations/external_keys/{external_key_id}

Aggiorna parzialmente una configurazione di chiave esterna. I campi omessi restano invariati.

Elimina chiave esterna
client.organization.externalKeys.delete(externalKeyID, options?): ExternalKeyDeleteResponse
DELETE/v1/organizations/external_keys/{external_key_id}

Elimina una configurazione di chiave esterna.

Convalida chiave esterna
client.organization.externalKeys.validate(externalKeyID, options?): ExternalKeyValidateResponse
POST/v1/organizations/external_keys/{external_key_id}/validate

Convalida una configurazione di chiave esterna rispetto al KMS del cliente.

Models
interface AWSExternalKeyConfig { type: "aws"; kms_arn; region }
type: "aws"
kms_arn: string

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.

maxLength2048
region?: string | null

AWS region. Derived from kms_arn if omitted.

interface AzureExternalKeyConfig { type: "azure"; key_name; tenant_id; /* 2 more */ }
type: "azure"
key_name: string

Name of the key within the vault.

tenant_id: string

Azure AD tenant ID.

vault_uri: string

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

client_id?: string | null

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.

interface AzureExternalKeyConfigParam { type: "azure"; key_name; tenant_id; /* 2 more */ }

Azure Key Vault provider configuration.

type: "azure"
key_name: string

Name of the key within the vault.

tenant_id: string

Azure AD tenant ID.

vault_uri: string

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

client_id?: string | null

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.

interface ExternalKey { type: "external_key"; id; attachment; /* 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).

interface ExternalKeyAttachedAttachment { type: "attached" }
type: "attached"
defaultattached
interface ExternalKeyUnattachedAttachment { type: "unattached" }
type: "unattached"
defaultunattached
interface GCPExternalKeyConfig { type: "gcp"; key_name }
type: "gcp"
key_name: string

Full resource name of the Cloud KMS key.

interface ExternalKeyDeleteResponse { type: "external_key_deleted"; id }
type: "external_key_deleted"
defaultexternal_key_deleted
id: string

ID of the deleted External Key.

interface ExternalKeyValidateResponse { type: "external_key_validation"; error; status }

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

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

type: "external_key_validation"
defaultexternal_key_validation
error: string | null

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"