---
title: "Create Backup Policy Rule"
method: POST
path: "/organizations/{organization_id}/policies/{policy_id}/rules"
tags: ["BackupPolicies"]
---

# Create Backup Policy Rule

`POST /organizations/{organization_id}/policies/{policy_id}/rules`

## Request

- Base URL: `https://api.cloudranger.com/202004`
- URL: `https://api.cloudranger.com/202004/organizations/{organization_id}/policies/{policy_id}/rules`
- Auth: API key in header `Authorization` and API key in header `x-api-key`

Create Backup Policy Rules for the specified policy

## Path parameters

- `organization_id` string, required
- `policy_id` string, required

## Request body

- PostOrganizationsPoliciesRulesRequest
  - `accounts` object[]
    - `account_id` string
  - `all_accounts` boolean
  - `all_regions` boolean
  - `all_resource_types` boolean
  - `exclude` boolean
  - `policy_id` string
  - `regions` string[]
  - `resource_types` string[]
  - `resources` object[]
    - `account_id` string
    - `region` string
    - `resource_id` string
    - `type` string
  - `rule_type` 'tags' | 'resource_id' | 'location'

## Response `200`

200 response

- PostOrganizationsPoliciesRulesResponse
  - `accounts` object[]
    - `account_id` string
    - `rule_id` integer
  - `all_accounts` boolean
  - `all_regions` boolean
  - `all_resource_types` boolean
  - `exclude` boolean
  - `id` integer
  - `policy_id` string
  - `regions` string[]
  - `resource_types` string[]
  - `resources` object[]
    - `account_id` string
    - `region` string
    - `resource_id` string
    - `rule_id` integer
    - `type` string
  - `rule_type` string

## Other responses

- `201`: 201 response
- `401`: 401 response
- `403`: 403 response
- `404`: 404 response

---

[API](https://skmtc.dev/druva/apis/cloudranger.md) - [All operations](https://skmtc.dev/druva/apis/cloudranger/llms.txt) - [OpenAPI document](https://skmtc.dev/druva/apis/cloudranger/revisions/0b87602807da?raw)
