Claude Platform Docs

Elimina invito

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

Elimina un invito in sospeso.

Parameters
inviteID string⁠Path parameter

ID of the Invite.

Returns
type OrganizationInviteDeleteResponse struct { Type: "invite_deleted"; ID }
Type InviteDeleted

Deleted object type.

For Invites, this is always "invite_deleted".

defaultinvite_deleted
ID string

ID of the Invite.

Errors

Any method can also return the general HTTP errors.

ErrorCodeSandboxEgressRestrictedHTTP status 403error code sandbox_egress_restricted

The request came from a Claude sandbox with restricted network access, which is not allowed to make this request. Send it from outside the sandbox, or from a sandbox with unrestricted network access.

Elimina invito
package main

import (
	"context"
	"fmt"

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

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