Claude Platform Docs

Externen Key löschen

client.Beta.Organization.ExternalKeys.Delete(ctx, externalKeyID) (*BetaOrganizationExternalKeyDeleteResponse, error)
DELETE/v1/organizations/external_keys/{external_key_id}

Löscht eine externe Key-Konfiguration.

Die Anfrage wird abgelehnt, wenn noch ein Workspace auf diese Konfiguration verweist.

Parameters
externalKeyID string⁠Path parameter

ID of the External Key.

maxLength2048
Returns
type BetaOrganizationExternalKeyDeleteResponse struct { Type: "external_key_deleted"; ID }
Type ExternalKeyDeleted
defaultexternal_key_deleted
ID string

ID of the deleted External Key.

Externen Key löschen
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	externalKey, err := client.Beta.Organization.ExternalKeys.Delete(context.TODO(), "external_key_id")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", externalKey.ID)
}
Returns Examples
Response 200
{
  "id": "ekey_01AbCdEfGhIjKlMnOpQrStUv",
  "type": "external_key_deleted"
}