Webhook interceptors
An interceptor is the mirror image of a test inbox: instead of catching email, it catches HTTP requests. Point a system under test at an interceptor URL, then read back exactly what it sent.
Creating one
Section titled “Creating one”Tools → Webhook Interceptor → New, or over the API:
POST /v1/webhooksEach interceptor has a capture URL of the form https://webhooks.mailcatchr.com/<key>. The key in the path is the only credential, so treat the URL as a secret.
What it does with a request
Section titled “What it does with a request”- Records the method, path, query, headers, body, source address and time.
- Answers with the response you configured: status, content type and body. The default is
200with content typeapplication/jsonand body{"ok":true}. - Optionally forwards the request to a URL of yours, and records the outcome. Use it to keep a searchable history of production webhooks while still delivering them.
Forwarding
Section titled “Forwarding”forwardMode takes one of three values, and the last two need a forwardUrl (HTTPS, publicly reachable):
forwardMode |
What happens |
|---|---|
None |
The request is recorded and nothing else. This is the default |
Relay |
The sender gets your configured response at once. The request is then delivered to forwardUrl, and retried after 1 minute, 5 minutes, 30 minutes and 2 hours if that fails |
Proxy |
The request is passed to forwardUrl while the sender waits, up to 10 seconds, and the sender gets that response’s status and body |
curl -X PATCH -H "Authorization: Bearer $MAILCATCHR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"forwardMode":"Relay","forwardUrl":"https://example.com/hooks/orders"}' \ "https://api.mailcatchr.com/v1/webhooks/$WEBHOOK_ID"Each captured request reports the outcome in forwardStatus: None, Pending, Delivered or Failed.
Reading requests
Section titled “Reading requests”GET /v1/webhooks/{webhookId}/requests?page=1&pageSize=50GET /v1/webhooks/requests/{requestId}The list returns summaries newest first. The detail includes headers and, when the body is text, the body itself. A captured request can be replayed to the forward URL, and a webhook’s history can be cleared.
Retention and limits
Section titled “Retention and limits”Captured requests are kept for the interceptor’s retention window, then deleted.
| Plan | Interceptors |
|---|---|
| Free | 1 |
| Business | 250 |
A workspace API key sees every interceptor in its workspace.