The short answer
A webhook URL is the address a system sends its webhook requests to. When an event happens, the sender makes an HTTP request (almost always a POST with a JSON body) to that URL. If you're new to webhooks, read what a webhook is first.
Two kinds of webhook URL
You'll meet webhook URLs from both sides:
| You get the URL | You give the URL | |
|---|---|---|
| Example | Discord, Slack, Microsoft Teams, Zapier | Stripe, GitHub, Shopify, PayPal |
| Who sends to it | You (scripts, tools) | The provider |
| Who runs the server | The platform | You |
| What it's for | Posting messages or starting workflows | Being told about events |
URLs you get are created by a platform so you can send to it: a Discord webhook or a Slack webhook posts into a channel; an n8n or Zapier webhook starts a workflow; a Home Assistant webhook runs an automation.
URLs you give point at your own endpoint. You paste them into a provider's settings, and the provider sends you events.
How to get a URL for receiving webhooks
You have three options:
- Build an endpoint in your app and deploy it on a public HTTPS address (example below).
- Use a tunnel to your laptop while developing. See testing webhooks locally.
- Use a webhook service. A HookStead source gives you a URL like
https://…/in/<token>in seconds, stores everything sent to it, and forwards to your app.
A minimal endpoint does three things:
// Express
app.post("/webhooks/stripe", express.raw({ type: "application/json" }), (req, res) => {
// 1. verify the signature over req.body (raw bytes)
// 2. store or queue the event
res.sendStatus(200); // 3. answer quickly
});What makes a good webhook URL
- Public and HTTPS. Providers can't reach
localhostor private networks, and most refuse plain HTTP. - Stable. Every change means updating every provider. Tunnel URLs that change on restart are for development only.
- No redirects. Most senders don't follow them, so a redirect counts as a failed delivery. Two classic causes: registering
http://when the server redirects tohttps://, and a trailing slash that the framework redirects away (a 301 or 308 in the provider's delivery log). Register the exact final URL. - Fast. It should answer 2xx within a second or two and do slow work in the background, or the sender times out and retries.
- Accepts the method and content type the sender uses, usually POST with
application/json.
Keep strangers out
A webhook URL is public: anyone who finds it can send requests to it. How much that matters depends on the kind:
- URLs you get (Discord, Slack) are bearer secrets. The URL itself is the credential, so anyone who has it can post. Keep it in an environment variable, never in front-end code, a mobile app or a public repository, and replace it if it leaks.
- URLs you give should not rely on secrecy alone. Check the provider's signature on every request and reject anything that fails. See webhook signature verification.
A random token in the path (/in/k7Qp…) is a good second layer: it keeps scanners and guessers out. It's not a replacement for signatures, because URLs end up in logs, screenshots and browser history.
Webhook sender, receiver and URL
The vocabulary is simple once you've seen it:
- Webhook sender: the system that sends the request (Stripe, GitHub, your script).
- Webhook receiver or endpoint: the server that handles it.
- Webhook URL: the receiver's address.
- Payload: the request body describing the event.
Change backends without touching providers
With HookStead, providers send to a HookStead source URL that never changes. Behind it you can add, move or replace destinations (a new server, a staging copy, a tunnel) without updating Stripe, GitHub or anyone else. Read the docs to set one up.
Frequently asked questions
- What is a webhook URL?
- The address a system sends webhook requests to. When an event happens, the sender makes an HTTP POST with the event to that URL.
- How do I get a webhook URL?
- To receive events, build an endpoint on a public HTTPS address, use a tunnel while developing, or use a webhook service that gives you a URL. To post into Discord or Slack, create an incoming webhook in their settings.
- Is a webhook URL secret?
- URLs from Discord, Slack and similar platforms are secrets: anyone with them can post. For your own endpoint, keep the URL private too, but rely on signature checks, not secrecy.
- Why does my webhook URL get a 308 or 301?
- The server redirects the request, usually from http to https or by adding or removing a trailing slash. Most senders don't follow redirects. Register the exact final URL.