---
title: policyRulesPurgeGroup mutation | Wartiva GraphQL API
description: Deletes every policy rule in a group, including the rules Wartiva provides in that group; rules the organization has moved to another group are kept.
url: https://wartiva.com/api-docs/mutations/policy-rules-purge-group.html
updated: 2026-10-07
---

Policies and findings · GraphQL mutation

# `policyRulesPurgeGroup` mutation

Deletes every policy rule in a group, including the rules Wartiva provides in that group; rules the organization has moved to another group are kept. Each rule is deleted on its own, so a request can partly succeed. Findings and issues the rules already produced are kept.

## Response

Returns a [`RulesPurgeGroupPayload!`](https://wartiva.com/api-docs/types/rules-purge-group-payload.html)

## Arguments

| Name | Description |
|---|---|
| `orgId` - [`OrganizationId!`](https://wartiva.com/api-docs/types/organization-id.html) | The Organization identifier. |
| `input` - [`RulesPurgeGroupInput!`](https://wartiva.com/api-docs/types/rules-purge-group-input.html) | Identifies the rule group to delete in bulk. |

## Example

### Query

```graphql
mutation policyRulesPurgeGroup(
  $orgId: OrganizationId!,
  $input: RulesPurgeGroupInput!
) {
  policyRulesPurgeGroup(
    orgId: $orgId,
    input: $input
  ) {
    group
  }
}

```

### Variables

```json
{
  "orgId": "615f3b3b28284380e28a7342",
  "input": RulesPurgeGroupInput
}

```

### Response

```json
{
  "data": {
    "policyRulesPurgeGroup": {
      "group": "xyz789"
    }
  }
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
