Claude Platform Docs

Внешние ключи

Создать внешний ключ
client.organization.externalKeys.create(body, options?): ExternalKey
POST/v1/organizations/external_keys

Создаёт конфигурацию внешнего ключа, принадлежащую организации вызывающей стороны.

Список внешних ключей
client.organization.externalKeys.list(query?, options?): PageCursor<ExternalKey>
GET/v1/organizations/external_keys

Возвращает список конфигураций внешних ключей в организации вызывающей стороны.

Получить внешний ключ
client.organization.externalKeys.retrieve(externalKeyID, options?): ExternalKey
GET/v1/organizations/external_keys/{external_key_id}

Возвращает одну конфигурацию внешнего ключа в организации вызывающей стороны по идентификатору.

Обновить внешний ключ
client.organization.externalKeys.update(externalKeyID, body, options?): ExternalKey
POST/v1/organizations/external_keys/{external_key_id}

Частично обновляет конфигурацию внешнего ключа. Пропущенные поля остаются без изменений.

Удалить внешний ключ
client.organization.externalKeys.delete(externalKeyID, options?): ExternalKeyDeleteResponse
DELETE/v1/organizations/external_keys/{external_key_id}

Удаляет конфигурацию внешнего ключа.

Проверить внешний ключ
client.organization.externalKeys.validate(externalKeyID, options?): ExternalKeyValidateResponse
POST/v1/organizations/external_keys/{external_key_id}/validate

Проверяет конфигурацию внешнего ключа в KMS клиента.

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"