Claude Platform Docs

Delete Invite

client.Beta.Organization.Invites.Delete(ctx, inviteID) (*BetaOrganizationInviteDeleteResponse, error)
DELETE/v1/organizations/invites/{invite_id}

Delete a pending invite.

Parameters
inviteID string

ID of the Invite.

Returns
type BetaOrganizationInviteDeleteResponse struct{…}
ID string

ID of the Invite.

Type InviteDeleted

Deleted object type.

For Invites, this is always "invite_deleted".

defaultinvite_deleted

Delete Invite

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"),
	)
	invite, err := client.Beta.Organization.Invites.Delete(context.TODO(), "invite_id")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", invite.ID)
}
{
  "id": "invite_015gWxCN9Hfg2QhZwTK7Mdeu",
  "type": "invite_deleted"
}
Returns Examples
{
  "id": "invite_015gWxCN9Hfg2QhZwTK7Mdeu",
  "type": "invite_deleted"
}