Skip to content
Docs
Groups

Delete group

Delete group

client.Zones.Groups.Delete(ctx, groupID, body) error
DELETE/zones/{zoneId}/groups/{groupId}

Deletes a group and its memberships and role assignments. Groups synced from an external directory can only be deleted by that directory (after external sync is disabled).

ParametersExpand Collapse
groupID string
body ZoneGroupDeleteParams
ZoneID param.Field[string]

Zone ID

Delete group

package main

import (
  "context"

  "github.com/keycardai/keycard-go"
  "github.com/keycardai/keycard-go/option"
)

func main() {
  client := keycard.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Zones.Groups.Delete(
    context.TODO(),
    "groupId",
    keycard.ZoneGroupDeleteParams{
      ZoneID: "zoneId",
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples