---
title: "Create"
method: POST
path: "/ip_policy_rules"
tags: ["IPPolicyRules"]
---

# Create

`POST /ip_policy_rules`

Create a new IP policy rule attached to an IP Policy.

## Headers

- `ngrok-version` integer, required

## Request body

- IPPolicyRuleCreate
  - `description` string — human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
  - `metadata` string — arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
  - `cidr` string, required — an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
  - `ip_policy_id` string, required — ID of the IP policy this IP policy rule will be attached to
  - `action` string, required — the action to apply to the policy rule, either `allow` or `deny`

## Response `201`

Create a new IP policy rule attached to an IP Policy.

- IPPolicyRule
  - `id` string — unique identifier for this IP policy rule
  - `uri` string — URI of the IP policy rule API resource
  - `created_at` string — timestamp when the IP policy rule was created, RFC 3339 format
  - `description` string — human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
  - `metadata` string — arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
  - `cidr` string — an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
  - `ip_policy` Ref
    - `id` string — a resource identifier
    - `uri` string — a uri for locating a resource
  - `action` string — the action to apply to the policy rule, either `allow` or `deny`

---

[API](https://skmtc.net/ngrok/apis/ngrok-openapi.md) · [All operations](https://skmtc.net/ngrok/apis/ngrok-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ngrok/ngrok-openapi/versions/1994bbb04714/schema)
