How to get Email delivery logs on Webhook

You can use Webhook to receive the logs of the emails sent from your MSG91 account.


Follow the below steps-


1. Log in to your MSG91 account and select the Email section.


MSG91 Dashboard


2. Select the Webhooks option in the URL and enter the webhook URL in the delivery report option and click on the Save button.


Webhook Options In Email Tool


3. In case the webhook is not set properly, you would get an error as shown in the image below.


Invalid Webhook URL Error


You can try https://pipedream.com/requestbin to create a Webhook for testing. Refer to this Help Doc for details.


Note-

  • You will receive the data on your Webhook URL as soon as the report of your sent email gets updated.


  • In the received report data, you will be able to check the status of the email in the field - "title" i.e., "title": "Delivered". Similarly for bounced, failed, etc.


  • If you remove the 'reply to' field, it doesn't mean that the user cannot send the replies to the email ID and hence it won't bounce. 

If you want to have a no-reply functionality, you can use an email ID in the "from" field like                              [email protected] which doesn't actually exist. You will be able to send emails via API using such an email ID, but it won't receive any emails. Also, the user will be able to understand from its name ([email protected]) that no reply should be made to this email.


  • We reject the webhook if it doesn’t return a 200 response code. In this case, we suggest you check the webhook on your end once.

  • For the webhook of domain status, please note that the data will be only posted in below mentioned cases:

    Enabled or disabled by admin or automatically(by spam rate).

    Any record SPF, DKIM, or MX status changes from verified to unverified and vice-versa.

    Or if the domain’s per-hour email limit is changed by the admin




Here is a Sample Response on Webhook for Reference:

Sample Webhook Response