Claude Platform Docs

Delete External Key

ExternalKeyDeleteResponse beta().organization().externalKeys().delete(ExternalKeyDeleteParamsparams = ExternalKeyDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/v1/organizations/external_keys/{external_key_id}

Delete an external key config.

The request is rejected if any workspace still references this config.

Parameters
ExternalKeyDeleteParams params
Optional<String> externalKeyId

ID of the External Key.

maxLength2048
Returns
class ExternalKeyDeleteResponse:
String id

ID of the deleted External Key.

JsonValue type "external_key_deleted"constant

Delete External Key

package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.externalkeys.ExternalKeyDeleteParams;
import com.anthropic.models.beta.organization.externalkeys.ExternalKeyDeleteResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        ExternalKeyDeleteResponse externalKey = client.beta().organization().externalKeys().delete("external_key_id");
    }
}
{
  "id": "ekey_01AbCdEfGhIjKlMnOpQrStUv",
  "type": "external_key_deleted"
}
Returns Examples
{
  "id": "ekey_01AbCdEfGhIjKlMnOpQrStUv",
  "type": "external_key_deleted"
}