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

---

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