---
title: "POST /api/v1/projects/{id}/policies"
method: POST
path: "/api/v1/projects/{id}/policies"
---

# POST /api/v1/projects/{id}/policies

`POST /api/v1/projects/{id}/policies`

## Request

- Base URL: `https://dev.noveum.ai`
- URL: `https://dev.noveum.ai/api/v1/projects/{id}/policies`
- Auth: API key in cookie `apiKeyCookie` and HTTP bearer

## Path parameters

- `id` string, required

## Query parameters

- `organizationSlug` string

## Request body

- union
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `window` '1d_rolling' | '7d_rolling' | '30d_rolling' | '1d_calendar' | '1mo_calendar', required
      - `action` 'BLOCK'
      - `scopeToModels` string[]: Request-model applicability filter only. Matching requests are evaluated against aggregate project or organization spend for the configured window, including spend from other models; this does not create per-model cost budgets. Omit or use an empty list to apply the cap to every model.
      - `enforcementMode` 'ADVISORY' | 'STRICT'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `windows` object[], required
        - `period` '1m' | '1h' | '1d', required
        - `action` 'BLOCK'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `allowed` string[]
      - `denied` string[]
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `patterns` object[], required
        - `name` string, required
        - `regex` string, required
        - `flags` string
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
      - `redactWith` string
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `words` string[], required
      - `caseInsensitive` boolean
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
      - `redactWith` string
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `entities` string[]
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
      - `maskChar` string
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `detectors` string[]
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `schema` object, required
      - `allowMarkdownCodeFences` boolean
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `scopeToModels` string[]
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `scorer` string, required
      - `threshold` number, required
      - `comparison` 'lt' | 'lte' | 'gt' | 'gte'
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `threshold` number
      - `detectors` string[]
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `allowedTopics` string[]
      - `blockedTopics` string[]
      - `threshold` number
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `categories` string[], required
      - `threshold` number
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'
  - object
    - `name` string, required
    - `description` string
    - `mode` 'OFF' | 'SHADOW' | 'ENFORCE'
    - `failClosed` boolean
    - `priority` integer
    - `enabled` boolean
    - `type` string, required
    - `config` object, required
      - `phase` 'input' | 'output' | 'both'
      - `minGroundingScore` number
      - `sourceField` string
      - `action` 'ALLOW' | 'BLOCK' | 'REDACT' | 'MASK' | 'HASH' | 'REPLACE' | 'FLAG_ONLY'

---

[API](https://skmtc.dev/noveum/apis/noveum-api.md) · [All operations](https://skmtc.dev/noveum/apis/noveum-api/llms.txt) · [OpenAPI document](https://skmtc.dev/noveum/apis/noveum-api/revisions/1745e27f38d0?raw)
