Supported events

Netcore Email API supports webhooks for below listed events:

Event Description
delivered Message has been delivered successfully
dropped Message got dropped
bounce Message has hard bounce
open Message got opened
click Recipient clicked a link in the message; will only occur when click tracking is enabled
unsubscribe Recipient Unsubscribed
abuse Recipient marked a mail as spam

Delivered Webhook

An email has been successfully delivered to the receiving server:

Sample sent webhook data

An example of the full JSON that would be posted to your webhook URL is:

[
	{
			"sg_message_id": "15536250111702803",
			"response": "smtp;250 2.0.0 _SMR_secure92nd.exacttouch.com Ok: queued as D43F43005C2",
			"email": "[email protected]",
			"timestamp": 1553681625,
			"fromaddress": "[email protected]",
			"event": "delivered",
			"msize": 2155,
			"customargs1": "value1",
			"customargs2": "value2",
			"tags": "mytag1"
	}
]

Dropped Webhooks

Emails to users, who have previously unsubscribed (or blacklisted because of hard bounce/Spam complaints), are treated as dropped. No further email communication is allowed on these types of ids.

Sample dropped request webhook data

An example of the full JSON that would be posted to your webhook URL is:

[
	{
			"sg_message_id": "15536250111702803",
			"reason": "Email dropped: User suppressed due to unsubscription",
		  "email": "[email protected]",
			"timestamp": 1553681625,
			"fromaddress": "[email protected]",
			"event": "dropped",
			"msize": 2155,
			"customargs1": "value1",
			"customargs2": "value2",
			"tags": "mytag1"
	}
]

Values for “reason” are listed below:

  • “Email dropped: User suppressed due to unsubscription”
  • “Email dropped: User suppressed due to hard bounce”
  • “Email dropped: User suppressed due to abuse complaint”
  • “Email dropped: User added to suppression list manually”
  • “Email dropped: User present in global blacklisting”
  • “Email ID Blocked”
  • “User Email Domain Blacklisted”
  • “Recipient email for sandbox testing not verified or limit exceeded”

Bounce Webhook

Bounces are classified into 4 types:

  • Hard Bounce
  • Soft Bounce
  • Technical Bounce
  • Block

Hard Bounce data

An example of the full JSON that would be Posted to your webhook URL is:

[
	{
			"sg_message_id": "15543162088093688",
			"response": "smtp;550 5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient’s email address for typo or unnecessary spaces. Learn more at https://support.google.com/mail/answer/6596 z130si23626456iod.1",
			"email": "[email protected]",
			"timestamp": 1554378741,
			"fromaddress": "[email protected]",
			"event": "bounce",
			"msize": 6364,
			"tags": "tag1",
			"type": "HARDBOUNCE",
			"reason": "email account that you tried to reach does not exist",
			"bouncereasonid": 77
	}
]

Soft Bounce data

An example of the full JSON that would be posted to your webhook URL is:

[
	{
			"sg_message_id": "15543162084122748",
			"response":"Host or domain name not found. Name service error for name=tesjsdfj.com type=A: Host not found",
			"email":"[email protected]",
			"timestamp":1547719884,
			"fromaddress":"[email protected]",
			"event":"bounce",
			"msize":3276,
			"tags":"tag1",
			"reason":"UnknownReason",
			"type":"SOFTBOUNCE",
			"bouncereasonid": 201
	}
]


For Technical bounce & block, value of “type” will be “TECHBOUNCE” & “BLOCK” respectively.

Open Tracking Webhooks

Recipient has opened the email

Sample open tracking webhook data

An example of the full JSON that would be posted to your webhook URL is:

[
	{
			"sg_message_id": "15543162084122748",
			"response": "",
			"email": "[email protected]",
			"timestamp": 1554375863,
			"fromaddress": "[email protected]",
			"event": "open",
			"msize": 6368,
			"useragent": "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)",
			"tags": "tag1",
	}
]

Click Tracking Webhooks

The Click Tracking webhook is a way by which Netcore Email API can notify your application when a recipient clicked a tracked link in your email.

Sample click tracking webhook data

An example of the full JSON that would be POSTed to your webhook URL is:

[
	{
			"sg_message_id": "15543162084122748",
			"response": "",
			"email": "[email protected]",
			"timestamp": 1554376443,
			"fromaddress": "[email protected]",
			"event": "click",
			"msize": 6368,
			"useragent": "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0",
			"tags": "tag1",
			"url": "https://www.pepipost.com",
			"ip": "123.201.124.74"
	}
]

Unsubscribe Webhooks

The Unsubscribe Tracking webhook is a way by which Netcore Email API can notify your application when a recipient clicked on the unsubscribe management link

Sample unsubscribe webhook data

An example of the full JSON that would be POSTed to your webhook URL is:

[
	{
			"sg_message_id": "15543162084122748",
			"reason": "Others",
			"email": "[email protected]",
			"timestamp": 1554376733,
			"fromaddress": "[email protected]",
			"event": "unsubscribe",
			"msize": 6368,
			"useragent": "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0",
			"ip": "123.201.124.74"
	}
]

value of “reason” depends on the text selected by the user at the time of unsubscription. Default Netcore Email API unsubscription form will forward below reasons:

  1. The emails are spam and should be reported
  2. Your emails are not relevant to me
  3. Your emails are too frequent
  4. I don’t remember signing up for this
  5. I no longer want to receive these email
  6. others

Abuse Webhooks

The Abuse webhook is a way by which Netcore Email API can notify your application when a recipient reports an email as spam

Sample abuse webhook data

An example of the full JSON that would be POSTed to your webhook URL is:

[
  {
    "email": "[email protected]",
    "event": "abuse",
    "fromaddress": "[email protected]",
    "msize": 4794,
    "response": "",
    "sg_message_id": "15825690082538435",
    "subject": "check the open track 1 - 4",
    "tags": "laborumdeseruntproiden,TESTX-APIHEADER",
    "timestamp": 1583148689
  }
]