Skip to main content

Slack incoming webhooks: how to get a webhook URL

A Slack incoming webhook is a URL you send an HTTP POST request to, and Slack posts the message into a channel. To get one, you create a Slack app, enable the Incoming Webhooks feature, and add a webhook to your workspace. Slack then generates a unique webhook URL for the channel you pick.

Incoming webhooks are the simplest way to push real-time notifications from an external application into Slack: deploy alerts, form submissions, support tickets, or anything else your app already knows about. This guide walks through generating the URL, sending your first message, formatting it, and keeping the URL secure.

Building webhooks?
Svix is the enterprise ready webhook receiver. With Svix, you can have a secure, reliable, and scalable webhook receiver in minutes. Give it a try!

1. Create a Slack app

  • Visit the Slack API website.
  • Click "Create New App" and choose "From scratch". Create a Slack app from scratch in the Slack API dashboard
  • Give your app a name, select a workspace, and click "Create App".
  • Consider using a sandbox workspace to avoid cluttering your main workspace with test messages. Naming a new Slack app and selecting a workspace

2. Enable incoming webhooks

  • In the app's "Features" sidebar, open the "Incoming Webhooks" section.
  • Toggle "Activate Incoming Webhooks" to "On". Activating the Incoming Webhooks feature in Slack app settings

3. Generate the webhook URL

  • Click "Add New Webhook to Workspace". Adding a new incoming webhook to a Slack workspace
  • Select the channel the webhook should post to, then authorize the app. Each webhook URL is tied to one channel, so repeat this step to post to additional channels.
  • Slack redirects you back to the app settings, where the URL appears under "Webhook URLs for Your Workspace".

The URL looks like https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX. Copy it into your application's configuration. That's your Slack incoming webhook, ready to receive messages.

Send a message to your Slack webhook

To post a message, send an HTTP POST request with a JSON body containing a text field. Here it is with curl:

curl -X POST \
-H 'Content-type: application/json' \
--data '{"text": "Hello from your app!"}' \
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Slack responds with ok and the message appears in the channel you chose. Any HTTP client works the same way, so you can trigger it from your backend whenever an event fires.

Format messages with Block Kit

The text field supports Slack's mrkdwn for bold, links, and emoji. For richer layouts (headers, buttons, dividers, fields) send a blocks array instead of plain text. Slack's Block Kit Builder lets you design a layout visually and copy the JSON straight into your webhook payload.

Keep your webhook URL secure

Anyone who has the URL can post to your channel, so treat it like a secret. Store it in an environment variable or secrets manager rather than committing it to source control, and never expose it in client-side code. If a URL leaks, delete that webhook from the "Incoming Webhooks" settings page and add a new one to rotate it.

Incoming webhooks are one-directional: they let you send messages into Slack, but they can't read messages or receive events back out. If you need Slack to send events to your own service, you're building a webhook receiver, which is a different and harder problem: verifying signatures, retrying failures, and scaling ingestion. Svix Ingest handles that side for you.

Frequently asked questions

How do I find an existing Slack webhook URL?

Open api.slack.com/apps, select your app, and go to "Incoming Webhooks" in the sidebar. Every webhook you've created is listed under "Webhook URLs for Your Workspace", each with its channel and a copy button.

Can one webhook post to multiple channels?

No. Each incoming webhook URL is bound to a single channel chosen when you created it. To post to another channel, add a new webhook to the workspace and select that channel, which gives you a separate URL.

How do I get a webhook URL for a specific channel?

In step 3 above, the "Add New Webhook to Workspace" dialog asks which channel to post to. Pick the channel there, and the generated URL will deliver messages to it.

Are Slack incoming webhooks free?

Yes. Incoming webhooks are available on all Slack plans, including the free tier, at no extra cost.

Do Slack webhook URLs expire?

They don't expire on their own, but they stop working if you delete the webhook, remove the app, or the app loses access to the workspace. Deleting and re-adding a webhook is also how you rotate the URL if it leaks.

If you inherited a webhook URL that was set up before Slack apps existed, see are Slack webhooks deprecated? for how the legacy custom integration differs from the app-based one above. For more on message composition and error handling, see Slack's official documentation. If you also need to receive webhooks from other services, Svix makes the receiving side reliable and secure.