## Delete

`client.Zones.Roles.Delete(ctx, roleID, body) error`

**delete** `/zones/{zoneId}/roles/{roleId}`

Permanently deletes a customer-owned role. Platform-owned roles cannot be deleted, and a role with existing assignments returns 409.

### Parameters

- `roleID string`

- `body ZoneRoleDeleteParams`

  - `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.Roles.Delete(
    context.TODO(),
    "roleId",
    keycard.ZoneRoleDeleteParams{
      ZoneID: "zoneId",
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```
