# Slack (/en/docs/platform/features/alerting/channels/slack)



A Slack channel type posts each alert as a message in one Slack channel, through a [Slack incoming webhook](https://api.slack.com/messaging/webhooks). Setup takes a few minutes: create the webhook in Slack, paste its URL into CentralCSP, send a test.

## Prerequisites [#prerequisites]

* The website **Manager** role in CentralCSP.
* Permission to install apps in your Slack workspace. Some workspaces restrict this to admins.

## 1. Create the incoming webhook in Slack [#1-create-the-incoming-webhook-in-slack]

Slack issues webhook URLs through a Slack app. You create the app once; it can hold one webhook per Slack channel.

1. Open [api.slack.com/apps](https://api.slack.com/apps) and select **Create New App**, then **From scratch**.
2. Name the app (for example `CentralCSP alerts`), pick your workspace, and select **Create App**.
3. In the app's settings, open **Incoming Webhooks** and switch **Activate Incoming Webhooks** on.
4. Select **Add New Webhook to Workspace**, choose the Slack channel that should receive alerts, and select **Allow**.
5. Copy the webhook URL. It starts with `https://hooks.slack.com/services/`.

Slack's own guide is at [Sending messages using incoming webhooks](https://api.slack.com/messaging/webhooks).

<Callout type="warn" title="The webhook URL is a secret">
  Anyone holding the URL can post to that Slack channel. Do not commit it or share it publicly; Slack scans for leaked URLs and revokes them, which silently stops your alerts. CentralCSP stores the URL and never returns it through the API.
</Callout>

## 2. Add the channel in CentralCSP [#2-add-the-channel-in-centralcsp]

1. In the dashboard, go to **Alerts** > **Configuration** > **Add channel**.
2. Name the channel, choose the **Slack** type, and paste the webhook URL.
3. Save.

The URL is validated as you type: it must be on `hooks.slack.com` with a path starting `/services/`, so a chat page URL or an API token pasted by mistake is rejected before you save.

## 3. Test the channel [#3-test-the-channel]

Select **Test** on the new channel. A sample alert built from a fake CSP violation is sent immediately.

If the message does not arrive, the webhook was refused. Check that the app is still installed in the workspace and that the webhook still exists under **Incoming Webhooks**; a revoked or deleted webhook fails permanently, it does not recover on its own.

## Posting to several Slack channels [#posting-to-several-slack-channels]

One webhook URL posts to one Slack channel. To notify a second channel, add another webhook to the same Slack app (step 1.4), then create a second CentralCSP channel with that URL, and attach both to your [rules](/en/docs/platform/features/alerting/rules).

## Next steps [#next-steps]

* [Create a rule](/en/docs/platform/features/alerting/rules) that delivers to this channel.
* [Channels overview](/en/docs/platform/features/alerting/channels) for auto-disable behaviour and limits.
* [Delivery history](/en/docs/platform/features/alerting/deliveries) to audit what was sent.
