---
title: "Create Edge Rule"
method: POST
path: "/sites/{site_id}/edge_rules/create"
tags: ["sites"]
---

# Create Edge Rule

`POST /sites/{site_id}/edge_rules/create`

## Request

- Base URL: `https://my.pressable.com/v1`
- URL: `https://my.pressable.com/v1/sites/{site_id}/edge_rules/create`
- Auth: none declared
- TypeScript: <https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/docs/sites/:site_id/edge_rules/create/post.ts> (a function with typed inputs; its response is checked against the schema)

Add an edge rule to a site. It goes to the bottom of its list, so the rules already there act first, except a trusted IP addresses rule, which goes to the top. It is activating until the edge has it, within a few minutes.

## Path parameters

- `site_id` integer, required

## Request body

- object
  - `name` string
  - `rule_key` string
  - `definition` object
  - `reason` string

## Response `200`

Successful Response

- object
  - `message` string
  - `code` string

---

[API](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1.md) - [All operations](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/revisions/267a95219f47?raw)
