Remove User
client.Beta.Organization.Users.Remove(ctx, userID) (*BetaOrganizationUserRemoveResponse, error)DELETE/v1/organizations/users/{user_id}
Remove User
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"),
)
user, err := client.Beta.Organization.Users.Remove(context.TODO(), "user_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", user.ID)
}{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"type": "user_deleted"
}Returns Examples
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"type": "user_deleted"
}