Skip to content
WebsiteOpen the app

Send one webhook to several paths

Add a second path to a source, so each webhook reaches both.

A source has one route for each path it sends webhooks to, and each route gets its own delivery of every webhook. This guide adds /webhooks/audit to Docs demo, so every webhook reaches both paths in your app.

  • The Docs demo route from the quickstart.
  • Your app answering POST /webhooks and POST /webhooks/audit on port 3000 with a 2xx status, and the CLI forwarding to it:
hookspot listen --forward-to http://localhost:3000
  1. Open Routes.
  2. Under Docs demo, click Add destination.
  3. Enter /webhooks/audit in the New path… field.
  4. Click Connect.

Routes shows two lines from Docs demo: one to /webhooks and one to /webhooks/audit. The CLI forwards to the new path without a restart.

Press t in the CLI. It lists two rows, one per delivery: POST /webhooks and POST /webhooks/audit. Your app gets the webhook at both paths.

Routes board with the Docs demo source routed to both /webhooks and /webhooks/audit, each with a last delivery of 200.

One source, two routes. Each webhook to Docs demo now gets one delivery per path.

In the app:

  1. Open Requests and select the new row. Its Route path reads /webhooks +1.
  2. Read What happened: Routed to 2 routes, then one Delivered · 200 for each path.

Each delivery has its own attempts and response, so one path can fail while the other works. Requests says which outcome the request shows then.

  1. Open Routes and click /webhooks/audit.
  2. Click Open, then select Settings.
  3. Click Delete destination and confirm.

Hookspot deletes the path and its route. Docs demo keeps its route to /webhooks.