A webhook is a simple HTTP callback, which uses a HTTP POST when an event happens. We use these webhooks to receive events to let us know new information about your email. Your Email Service Provider (ESP) will send us webhooks when your email is clicked, opened, etc. This gives you the ability to see all your email analytics in your Sendwithus dashboard.
Sendwithus is also able to redirect these events to an endpoint of your choosing. The webhooks are virtually unchanged, the only difference being that we add a few extra bits of Sendwithus related information to your webhook.
How do I relay webhook events to my server?
Click Delivery Settings on the navigation bar in your Sendwithus dashboard. Click on the Actions dropdown menu, and select “Settings” for the ESP account to relay the webhooks.
Enter a URL for Sendwithus to send webhooks too, and click Save when you are done.
Does Sendwithus forward all of my ESP’s webhooks?
Yes! All webhooks are forwarded to the endpoint you specify, even if the email didn’t originate from Sendwithus.
What do these webhooks look like?
Sendwithus adds the following addition information to SendGrid's webhook: swu_template_id, swu_template_version_id, receipt_id, drip_campaign_id (if applicable), and drip_campaign_step_id (if applicable).
Sendwithus adds the following addition information into X-Mailgun-Variables: swu_template_version_id, receipt_id, swu_template_id, drip_campaign_step_id (if applicable), and drip_campaign_id (if applicable).
Sendwithus adds the following addition information to Sparkpost's webhook: receipt_id, swu_template_id, and swu_template_version_id.
Sendwithus adds the following addition information to Mailjet's webhook: CustomID is equivalent to receipt_id.
Sendwithus does not add any additional information to Postmark's webhook.
Sendwithus adds the following addition information to Mandrill's webhook: receipt_id, swu_template_id, and swu_template_version_id.
ESP specific Webhook information can be found here:
How can I test my webhooks?
You can test and debug your webhooks using an external tool like ngrok. ngrok helps you create a public URL to expose a web site running locally to the internet. They also provide a real-time web interface where you can track HTTP traffic at
http://localhost:4040. For more information on getting started with ngrok check their documentation.