v4

latestOpenAPI 3.1.02026-08-08349225311.7 KB
runtime_mutations
rules

Create Rule Handler

post/api/rules

Request body

namestring required
descriptionstring
contentstring
rule_type'always' | 'manual' | 'pipeline'
globsstring[]
project_idstring nullable
kind'rule' | 'file-path'

Discriminator for which UI/dialog should render a rule.

rule (default) is a free-form natural-language rule. file_path is a structured rule whose body is generated from its path. The injected prompt content is the same for both — kind only affects the editor that opens for the rule.

file_pathstring nullable
pipelineobject nullable

Response

Successful Response

{"stackTrail":"paths:/api/rules:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}