Test Webhooks in Transactional Email
You can send test events to any outbound webhook URL in your Transactional Email account using our built-in testing tools.
To test a webhook in Transactional Email:
- Navigate to Settings in your Transactional Email account.
- Click Webhooks from the top menu.
- If you haven't already, configure a new webhook and select the types of events you'd like to receive.
- Click the send test button to send a batch of events to your webhook URL.
Transactional Email will send one event for each type you've selected. If you have only one type selected, we'll send two events for that type.
If the POST succeeds, we'll display a success message that includes the number of POSTed events. If the POST fails, you'll see an error message with more details on the failure.
Debug Webhooks Using Third-Party Tools
If you want to test webhooks in an external or temporary environment before making changes in production, check out one or more of the third-party tools listed below.
RequestBin
RequestBin provides you with a URL to collect and inspect HTTP requests. To get started, go to https://requestbin.com/, check the box next to "Private (only viewable from this browser)," then click the "Create a RequestBin" button.
Next, copy the bin URL they provide and enter that as your webhook URL in Transactional Email. On the Webhooks page, save your webhook URL then click the send test button to generate two example POSTs to your RequestBin URL.
In RequestBin, inspect requests by clicking the button in next to your bin URL in the upper right corner of the page, or editing your bin URL and appending ?inspect
to the end.
Runscope
Runscope provides API performance monitoring and HTTP request logging and inspection. Get started by creating a new Runscope bucket to capture incoming requests from Transactional Email (you'll use the bucket URL as your Transactional Email webhook URL).
In Transactional Email on the Webhooks page, save your webhook URL then click the send test button to generate two example POSTs to your Runscope Bucket. You can view the test requests in Runscope in the Captures stream view or Traffic Inspector.
ngrok
ngrok creates a secure public URL to a local server on your machine so you can test webhooks locally. Follow the steps in the ngrok docs to get started.
Copy the forwarding URL they provide (like http://92832de0.ngrok.io
) and add this as the webhook URL in Transactional Email. Save your webhooks then click the send test button to generate two example POSTs to your ngrok public URL. Inspect your ngrok traffic by visiting http://localhost:4040/
in your web browser.