# Creating Policies

{% hint style="info" %}
This document applies only to the Nightfall Developer APIs customers. If you are a Nightfall SaaS application customer, refer to [this document](https://help.nightfall.ai/nightfall-ai/operationalizing-dlp/the-nightfall-dashboard/policies).&#x20;
{% endhint %}

Policies allow customers to create templates for their most common workflows by unifying a set of Detection Rules with the actions to be taken when those rules are triggered, including:

* automated actions such as redaction of findings
* alerting through webhooks

Once defined, a Policy may be used in requests to the Nightfall API, such as calls to scan file uploads, though automated redactions are not available for uploaded files at this time.

To create a policy:

1. Log in to Nightfall.
2. Click P**olicies** under the **Configuration** sectio&#x6E;**.**&#x20;
3. Click **+ New Policy.**
4. Select **Developer APIs.**
5. Select the **Detection Rules** to be included in the policy and click **Next**.
6. Configure a notification channel. Click [here](https://help.nightfall.ai/nightfall_alert_platform/overview) to learn more about alert channel configuration. If you wish to setup a webhook alert channel, click [here](https://help.nightfall.ai/developer-api/key-concepts/setup/policies#configuring-webhook-alerts) for details.

{% hint style="info" %}
It is mandatory for you to configure at least one alert channel.
{% endhint %}

7. Click **Next**.
8. (Optional) Enable the **Redact Message** toggle switch. This is an automated action that is triggered when sensitive data is found. The action automatically redacts sensitive data.&#x20;
9. Click **Next**.
10. Enter a name for the policy.&#x20;
11. (Optional) Enter a Description for the policy and click **Next**.
12. Verify the configurations and click **Submit**.

## Configuring Webhook Alerts

To configure Webhook as an alert channel:&#x20;

1. Enable the **Webhook Alert** notification channel.
2. In the **Configure Webhook URL** field, enter the URL of the Webhook to which you wish to send notifications.
3. (Optional) Click **Add Headers** to add header key value pairs.
4. Click **Validate**.
5. Once validated, you can click **Next** to proceed.&#x20;

<figure><img src="/files/xFf1PyBKU11qp7Lia6No" alt="" width="563"><figcaption></figcaption></figure>

Similarly, you can also use **HTTP alerts** channel.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.nightfall.ai/developer-api/key-concepts/setup/policies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
