What is a Slack webhook?
A Slack webhook – officially an incoming webhook – is a unique URL that lets an external service post messages into one Slack channel. There's no bot token or OAuth flow to build: the service sends an HTTP POST request with a JSON payload, and the message appears in the channel. That makes a Slack webhook the simplest way to get website monitoring alerts in front of your team the moment something breaks.
How incoming webhooks work
Each webhook URL belongs to a Slack app and is tied to the single channel you chose when you created it. When your monitoring service detects a problem, it sends a POST request to that URL with a JSON body such as {"text": "example.com is down"}. Slack posts the message to the channel. Messages can be plain text or use Block Kit for richer layouts.
How to create a Slack incoming webhook
Slack's current setup flow runs through a Slack app you create at api.slack.com/apps. It takes about five minutes.
You need permission to install apps in your Slack workspace. If your workspace restricts app installs, Slack will ask you to request approval from a workspace admin.
- 1
Create a Slack app
Go to api.slack.com/apps and click "Create New App". Choose "From scratch", give the app a name such as "Website Monitor", pick the workspace that should receive alerts and click "Create App".
- 2
Activate incoming webhooks
In your app's settings, open "Incoming Webhooks" in the left sidebar and switch "Activate Incoming Webhooks" on.
- 3
Add a webhook to your workspace
Scroll down and click "Add New Webhook to Workspace". Slack asks which channel the app should post to – choose a dedicated channel such as #alerts – and then approve the request.
- 4
Copy the webhook URL
Back on the Incoming Webhooks page, your new URL appears under "Webhook URLs for Your Workspace". It looks like https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX. Copy it and treat it like a password.
Test your Slack webhook
Before you connect a monitoring service, check that the webhook works by sending a test message from your terminal. Replace the URL with your own:
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"Test alert from my monitoring setup"}' \
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXXIf everything is set up correctly, Slack responds with "ok" and the message appears in your channel.
Connect the Slack webhook to nanokoi.io
Slack alerts are included on every nanokoi.io plan, including Free. Once you have your webhook URL:
- 1Open Notification Settings in your nanokoi.io account
- 2Turn on "Enable Slack notifications"
- 3Paste your webhook URL into the Slack Webhook URL field
- 4Click "Test Webhook" and check that the test message arrives in your channel
From then on, nanokoi.io posts to the channel whenever a check fails. Alerts can come from uptime monitoring, SSL certificate monitoring or DNS monitoring, and you can use email and generic webhook alerts alongside Slack.
Slack incoming webhook limitations
Incoming webhooks are deliberately simple. Keep these limits in mind when you plan your alerting:
- Each webhook posts to one channel. Create one webhook per channel if you want to route alerts to several channels
- You can't override the channel, username or icon from the payload – they're set by the app and the channel you picked
- Messages sent through a webhook can't be edited or deleted later
- Slack limits incoming webhooks to about one message per second, with short bursts allowed
- Older "Incoming WebHooks" custom integrations are a legacy feature – use a Slack app for new setups
Common Slack webhook errors
If a message doesn't arrive, the response from Slack tells you why. The most common errors are:
invalid_payload
The JSON body is malformed. Check quotes, escaping and the Content-type: application/json header.
no_text
The payload is missing the required text field.
no_service
The webhook was disabled, removed or the URL is wrong. Create a new webhook and update the URL in your monitoring service.
channel_is_archived
The channel was archived. Unarchive it or add a new webhook for another channel.
action_prohibited
A workspace admin has restricted posting through this app or to this channel.
Best practices for Slack monitoring alerts
A few habits keep Slack alerts useful instead of noisy:
- Keep the webhook URL secret: it contains a token, so never commit it to a public repository. Slack actively detects and revokes leaked webhook URLs
- Use a dedicated alerts channel so incidents don't get lost in everyday conversation
- Route critical alerts and routine notifications to different channels, using one webhook per channel
- Test the webhook after every change to your Slack app, channel or workspace permissions
- Keep email alerts enabled as a backup in case of a Slack outage
- Remove webhooks you no longer use from your Slack app
Slack webhook FAQ
Are Slack incoming webhooks free?
Yes. You can create a Slack app and incoming webhooks on any Slack plan, including the free plan.
Can one Slack webhook post to several channels?
No. Each incoming webhook is tied to the channel you chose when you added it. To post to several channels, add one webhook per channel to your Slack app.
What should I do if my webhook URL leaks?
Remove the webhook from your app's Incoming Webhooks page, add a new one and update the URL everywhere it's used. Slack also revokes webhook URLs it finds exposed publicly.
Do I need to write code to send nanokoi.io alerts to Slack?
No. Paste the webhook URL into your nanokoi.io notification settings and click Test Webhook – nanokoi.io formats and sends the alert messages for you.
Get website alerts in Slack
Monitor up to 5 URLs for free and get alerts by Slack, email or webhook when a check fails. Need faster checks or more URLs? Compare the plans.
Start monitoring for freeNo credit card required