# 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="https://3789559529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDE6VZCJNhkLwvzLp4YDN%2Fuploads%2FS5IT6rtRapvOtvpQmJpK%2Fimage.png?alt=media&#x26;token=4d1bb8b8-fb09-40d7-aa11-5c93cb07612a" alt="" width="563"><figcaption></figcaption></figure>

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