﻿---
title: Create rules using the YAML editor in experimental alerting system
description: Define rules as YAML in Kibana's experimental alerting system for version control, infrastructure-as-code, and bulk provisioning of detection logic.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6523/explore-analyze/alerting/kibana-alerting-experimental/rules/create-rule-with-yaml
products:
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Experimental
  - Elastic Stack: Planned
---

# Create rules using the YAML editor in experimental alerting system
The YAML editor is part of the experimental alerting system in Kibana. It lets you define rules as text documents rather than filling in a form. Use it when you want to version-control rule definitions alongside your other configuration, manage rules through infrastructure-as-code tooling, copy or adapt a rule quickly without re-entering settings by hand, or provision many rules at once.
If you're creating a rule from scratch and want guidance through each setting, the [rule builder](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6523/explore-analyze/alerting/kibana-alerting-experimental/rules/create-rule-from-rule-builder) is the better starting point. If you have a query already working in Discover, you can [create a rule directly from there](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6523/explore-analyze/alerting/kibana-alerting-experimental/rules/create-rule-from-discover).
For the full list of supported YAML fields and their accepted values, refer to [YAML rule schema reference](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/6523/explore-analyze/alerting/kibana-alerting-experimental/rules/yaml-rule-schema-reference).