> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create New Rule

Create a new rule.

<Note>
  External Documentation

  To learn more, visit the [Chronicle documentation](https://cloud.google.com/chronicle/docs/reference/detection-engine-api#createrule).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter | Description                                  |
  | --------- | -------------------------------------------- |
  | Rule      | The new rule to create in YARA-L 2.0 format. |
</div>

## Example Output

```json theme={"dark"}
{
  "ruleId": "ru_1f54ab4b-e523-48f7-ae25-271b5ea8337d",
  "versionId": "ru_1f54ab4b-e523-48f7-ae25-271b5ea8337d@v_1605892700_409247000",
  "ruleName": "singleEventRule2",
  "metadata": {
    "author": "securityuser",
    "description": "single event rule that should generate detections"
  },
  "ruleText": "rule singleEventRule2 {
      meta:
        author = \"securityuser\"
        description = \"single event rule that should generate detections\"
      events:
        $e.metadata.event_type = \"NETWORK_DNS\"
      condition:
        $e
      }",
  "ruleType": "SINGLE_EVENT",
  "versionCreateTime": "2020-11-20T17:18:20.409247Z",
  "compilationState": "SUCCEEDED"
}
```

## Workflow Library Example

[Create New Rule with Chronicle and Send Results Via Email](https://library.blinkops.com/workflows/create-new-rule-with-chronicle-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/create-new-rule-with-chronicle-and-send-results-via-email/canvas" />
</div>
