---
title: "create customized rule"
method: POST
path: "/open/policy"
tags: ["rule"]
---

# create customized rule

`POST /open/policy`

## Request body

- PolicyPostPolicyReq
  - `action` 0 | 1 | 2 | 3 | 4 | 5 | 999 | 999
  - `expire` integer
  - `is_enabled` boolean
  - `level` integer
  - `log` boolean
  - `name` string
  - `pattern` array[]
    - ModelRulePattern[]
      - `k` string
      - `op` string
      - `sub_k` string
      - `v` string[]

## Response `200`

OK

- object
  - `data` integer
  - `err` string
  - `msg` string

## Changes

- **2026-04-03** `2d20e20d0f6e` — 2 info
  - api tag `rule` added
  - api tag `customized_rules` removed
- **2026-04-01** `de6007edcff9` — 2 info
  - api tag `customized_rules` added
  - api tag `rule` removed

[Change history](https://skmtc.dev/chaitin/apis/mgt-api/changes/open/policy/post.md)

---

[API](https://skmtc.dev/chaitin/apis/mgt-api.md) · [All operations](https://skmtc.dev/chaitin/apis/mgt-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chaitin/mgt-api/revisions/8ff8cf839cf1/schema)
