---
title: policyRulesAdd mutation | Wartiva GraphQL API
description: Adds between 1 and 500 policy rules to the organization. Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/mutations/policy-rules-add.html
updated: 2026-10-07
---

Policies and findings · GraphQL mutation

# `policyRulesAdd` mutation

Adds between 1 and 500 policy rules to the organization. Every rule in the request is validated before any is stored, so one invalid rule rejects the whole request. The server assigns each new rule's id. Each rule belongs to a group, whose name starts with a letter or digit and contains up to 128 letters, digits, dots, underscores, or hyphens. List rules with [policyRulesList](https://wartiva.com/api-docs/queries/policy-rules-list.html).

## Response

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

## Arguments

| Name | Description |
|---|---|
| `orgId` - [`OrganizationId!`](https://wartiva.com/api-docs/types/organization-id.html) | The Organization identifier. |
| `input` - [`RulesAddInput!`](https://wartiva.com/api-docs/types/rules-add-input.html) | Rules to insert. |

## Example

### Query

```graphql
mutation policyRulesAdd(
  $orgId: OrganizationId!,
  $input: RulesAddInput!
) {
  policyRulesAdd(
    orgId: $orgId,
    input: $input
  ) {
    count
  }
}

```

### Variables

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

```

### Response

```json
{
  "data": {
    "policyRulesAdd": {
      "count": "-8589934592"
    }
  }
}

```

---

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