# Create a policy

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

URL: https://docs.proteside.com/en/docs/api/reference/policies/createPolicy

## Method and route

`POST /policies`

## 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

- `name` (`string`), required
- `description` (`string`)
- `store_id` (`string`): Omit for an organization-level policy
- `mode` (`"recommend" | "auto"`)
- `priority` (`integer`)
- `match` (`object`)
- `conditions` (`object`)
- `action` (`"authorize" | "needs_review" | "block"`), required
- `justification_template` (`string`)
- `expires_days` (`integer,null`)
- `active` (`boolean`)

## Responses

- `201`: Policy
- `400`: Validation error
- `409`: Conflict

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