Claude Platform Docs

Validate External Key

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

Validate an external key config against the customer's KMS.

Anthropic performs an encrypt/decrypt roundtrip against the configured KMS key and waits up to 30 seconds for the result. The response status is success if the roundtrip succeeded, or failure with an error message if it failed or timed out.

Parameters
externalKeyID: string

ID of the External Key.

Returns
class ExternalKeyValidateResponse { $type = 'external_key_validation'; $error; $status; }
"external_key_validation" type
?string error

Error message when status is failure. Null otherwise.

Status status

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

Validate External Key
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'my-anthropic-api-key');

$response = $client->beta->organization->externalKeys->validate(
  'external_key_id'
);

var_dump($response);
Returns Examples
Response 200
{
  "error": "error",
  "status": "failure",
  "type": "external_key_validation"
}