https addresses. localhost, private and loopback addresses are refused when you save the endpoint, and again each time PostSyncer sends. To get events on a server running on your machine, put a tunnel in front of it.
Run your handler
Start your server on a local port, for example3000, with a route such as /webhooks/postsyncer. The route should:
- Read the raw body before parsing it, and check the signature. Verify webhook signatures has the code.
- Answer with a
2xxstatus within 10 seconds, and do slow work after that. - Skip an event whose
idit has already handled. Retries send the sameid.
Open a tunnel
A tunnel gives your local port a publichttps address. Any tunnel works, for example ngrok or Cloudflare Tunnel:
https address it prints. The examples below call it https://YOUR_TUNNEL_HOST.
The address must answer the request itself. PostSyncer doesn’t follow redirects, so a 3xx answer counts as a failure.
Create an endpoint
Point a new endpoint at the tunnel. Listen towebhook.test and the events you are building for:
id and its signing secret, which starts with whsec_. The API shows the secret this once, so save it where your handler reads it. You need webhooks:create, and to be the workspace’s owner or a manager. See Create a webhook.
If the tunnel’s address changes when you start it again, change the endpoint’s url with Update a webhook. Delete the endpoint when you’re done, so it doesn’t fail for 3 days and get turned off.
Send a test event
webhook.test event to this one endpoint and answers with the delivery, pending at first. It needs webhooks:update. Over MCP, the test-webhook tool does the same, and the app has a test button on each endpoint. See Send a test event.
A test sent to an endpoint that is off isn’t sent: its delivery fails with The destination is off.
See what happened
Each delivery keeps the request PostSyncer sent and what your server answered:?status=failed to see only the failed ones, including those that gave up. It needs webhooks:read, and the list-webhook-deliveries tool does the same. See List webhook deliveries.
To replay a stored request against your handler, sign it again with the script below. The stored signature is older than the 5 minutes a handler accepts, and a body cut at 64 KB no longer matches it.
In the app, Send again sends a failed delivery once more, while the endpoint is on.
Send a signed request yourself
You can also test your handler without PostSyncer, by signing a body with your endpoint’s secret the way PostSyncer does. This script sends the test event to your local server:body for any example on Webhook events to try that event. Your handler should accept this request, refuse it after you change one character of the body, and refuse it again when webhook-timestamp is more than 5 minutes old.