## Delete

`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).

### Parameters

- `groupID string`

- `body ZoneGroupDeleteParams`

  - `ZoneID param.Field[string]`

    Zone ID

### Example

```go
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())
  }
}
```
