---
title: "Create an IP rule"
method: POST
path: "/v1/security/ip-rules"
tags: ["Security"]
---

# Create an IP rule

`POST /v1/security/ip-rules`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/security/ip-rules`
- Auth: HTTP bearer

## Request body

- CreateIpRuleRequest
  - `rule_type` 'allow' | 'deny', required
  - `cidr` string, required
  - `label` string
  - `applies_to` string

## Response `201`

Rule created

- IpRuleResponse
  - `id` string, uuid
  - `org_id` string, uuid
  - `rule_type` string
  - `cidr` string
  - `label` string
  - `applies_to` string
  - `created_by` string
  - `created_at` string, date-time

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/5fa0918f3b41?raw)
