---
title: "Create a policy rule"
method: POST
path: "/api/v1/policy/automation/"
tags: ["Policy Rules"]
---

# Create a policy rule

`POST /api/v1/policy/automation/`

## Request

- Base URL: `https://api.tuteliq.ai`
- URL: `https://api.tuteliq.ai/api/v1/policy/automation/`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Create a new declarative policy rule. Rules are evaluated during detection and the highest-priority matching rule determines the policy_action in the response.

## Request body

- object
  - `name` string, required
  - `enabled` boolean, required
  - `endpoints` string[], required
  - `conditions` object, required
    - `min_risk_score` number
    - `min_severity` 'low' | 'medium' | 'high' | 'critical'
    - `categories` string[]
    - `age_groups` string[]
  - `action` object, required
    - `type` 'block' | 'flag' | 'escalate' | 'notify' | 'log_only', required
    - `escalate_to` string
    - `notify_channel` string
    - `message` string
    - `override_severity` string
  - `priority` integer, required

## Response `201`

Default Response

- object
  - `success` boolean
  - `rule` object
    - `id` string
    - `name` string
    - `enabled` boolean
    - `endpoints` string[]
    - `conditions` object
      - `min_risk_score` number
      - `min_severity` 'low' | 'medium' | 'high' | 'critical'
      - `categories` string[]
      - `age_groups` string[]
    - `action` object
      - `type` 'block' | 'flag' | 'escalate' | 'notify' | 'log_only', required
      - `escalate_to` string
      - `notify_channel` string
      - `message` string
      - `override_severity` string
    - `priority` integer
    - `created_at` string
    - `updated_at` string

## Changes

- **2026-10-19** `8490332e0031`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tuteliq/apis/tuteliq-api/changes/api/v1/policy/automation/post.md)

---

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