# Create a rule

> POST /rules endpoint of the Proteside API: parameters, request body, responses and code samples.

URL: https://docs.proteside.com/en/docs/api/reference/rules/createRule

## Method and route

`POST /rules`

## Parameters

- `org_id` (query, `string`): Partners only (`orgs:manage`): act on this child organization. May also be sent as `org_id` in JSON bodies.
- `Idempotency-Key` (header, `string`): Replays the original response for 24 h

## Request body

- `store_id` (`string`), required
- `type` (`"block" | "allow"`), required
- `target` (`"domain" | "src" | "hash"`), required
- `value` (`string`), required
- `label` (`string,null`)

## Responses

- `201`: Rule
- `400`: Validation error

Full OpenAPI specification: https://app.proteside.com/api/v1/openapi.json
