WebHook
Email status callback
URL
User-defined filling on the page
Content-Type:
application/json; charset=utf-8
HTTP Request Method
post
Request Headers
Header | Type | Required | Description |
---|---|---|---|
X-WebHook-Timestamp | String | true | timestamp |
X-WebHook-AppKey | String | true | fixed value:“email” |
X-WebHook-Signature | String | true | digital signature |
Request Body
Parameter | Type | Description |
---|---|---|
message_id | string | message id |
to | string | recipient (empty in target message) |
server | string | |
itime | long | message generation timestamp |
custom_args | json | customer-defined fields |
status | json | message status callback |
Tips:
- Signature algorithm: use the user app key as the encryption key to perform HmacSHA256 operation on the timestamp time to obtain hexadecimal characters.
Email target status message
Trigger condition:Email request successful.
status
Parameter | Type | Description |
---|---|---|
message_status | string | target |
status_data | json object | status data |
message | string | successfully request |
task_id | int | task id |
api_user | string | api user |
tos | array | recipient array |
email_ids | array | recipient email id array |
label_id | int | label id |
{
"server": "email",
"message_id": "1676615711309_104117_18546_8821.sc-10_43_7_16-inbound",
"itime": 1676615711325,
"status": {
"message_status": "target",
"status_data": {
"email_ids": [
"1676615711309_104117_18546_8821.sc-10_43_7_16-inbound0$12345@hotmail.com"
],
"tos": [
"12345@hotmail.com"
],
"task_id": "-1",
"api_user": "scgp_email_system_trigger",
"message": "successfully request",
"label_id": 0
}
},
"custom_args": {}
}
Email sent status message
Trigger condition:Email successfully sent from EngageLab.
status
Parameter | Type | Description |
---|---|---|
message_status | string | sent |
status_data | json object | status data |
message | string | Successfully sent |
task_id | int | task id |
api_user | string | api user |
email_id | string | email id |
label_id | int | label id |
{
"server": "email",
"message_id": "1676615711309_104117_18546_8821.sc-10_43_7_16-inbound0$12345@hotmail.com",
"to": "12345@hotmail.com",
"itime": 1676615714397,
"status": {
"message_status": "sent",
"status_data": {
"email_id": "1676615711309_104117_18546_8821.sc-10_43_7_16-inbound0$12345@hotmail.com",
"task_id": "-1",
"api_user": "scgp_email_system_trigger",
"message": "successfully sent",
"label_id": 0
}
},
"custom_args": {}
}
Email delivered status message
Trigger condition:Email delivery successful.
status
Parameter | Type | Description |
---|---|---|
message_status | string | delivered |
status_data | json object | status data |
message | string | successfully delivered |
task_id | int | task id |
api_user | string | api user |
email_id | string | email id |
label_id | int | label id |
{
"server": "email",
"message_id": "1675758375681_15_6393_8309.sc-10_2_226_96-test0$12345@gmail.com",
"to": "12345@gmail.com",
"itime": 1675758376586,
"status": {
"message_status": "delivered",
"status_data": {
"email_id": "1675758375681_15_6393_8309.sc-10_2_226_96-test0$12345@gmail.com",
"task_id": "-1",
"api_user": "1224_xjm",
"message": "successfully delivered",
"label_id": 0
}
},
"custom_args": {}
}
Email invalid_email status message
Trigger condition:Email Failed to Deliver.
status
Parameter | Type | Description |
---|---|---|
message_status | string | invalid_email |
status_data | json object | status data |
task_id | int | task id |
api_user | string | api user |
email_id | string | email id |
label_id | int | label id |
error_code | int | error code |
error_detail | json | error detail |
message | string | mailbox return log |
sub_stat | int | error subcategory. 4xx indicates that the category is invalid email |
sub_stat_desc | string | error subcategory description |
{
"server": "email",
"message_id": "1676537131885_95_4921_8644.sc-10_2_226_96-test0$12345@gmail.com",
"to": "12345@gmail.com",
"itime": 1676537132783,
"status": {
"message_status": "invalid_email",
"error_code": 409,
"error_detail": {
"sub_stat": 409,
"message": "Domain may not exist or DNS check failed [MF99jssew+U8hyLhCJdZwkffXOKzGzvvQq5UZaSZR1BIotz1+sUrL6gFET3lJu6KdQ== IP: 8.219.236.47].",
"sub_stat_desc": "Other"
},
"status_data": {
"email_id": "1676537131885_95_4921_8644.sc-10_2_226_96-test0$12345@gmail.com",
"task_id": "-1",
"api_user": "postmaster@sendcloud.io",
"label_id": 0
}
},
"custom_args": {}
}
Email soft_bounce status message
Trigger condition:Email message reached the recipient’s mail server but later returned.
status
Parameter | Type | Description |
---|---|---|
message_status | string | soft_bounce |
status_data | json object | status data |
task_id | int | task id |
api_user | string | api user |
email_id | string | email id |
label_id | int | label id |
error_code | int | error code |
error_detail | json | error detail |
message | string | mailbox return log |
sub_stat | int | error subcategory. 5XX indicates that the category is soft bounce |
sub_stat_desc | string | error subcategory description |
{
"server": "email",
"message_id": "1676537131885_95_4921_8644.sc-10_2_226_96-test0$12345@gmail.com",
"to": "12345@gmail.com",
"itime": 1676537132783,
"status": {
"message_status": "soft_bounce",
"error_code": 509,
"error_detail": {
"sub_stat": 509,
"message": "Domain may not exist or DNS check failed [MF99jssew+U8hyLhCJdZwkffXOKzGzvvQq5UZaSZR1BIotz1+sUrL6gFET3lJu6KdQ== IP: 8.219.236.47].",
"sub_stat_desc": "Other"
},
"status_data": {
"email_id": "1676537131885_95_4921_8644.sc-10_2_226_96-test0$12345@gmail.com",
"task_id": "-1",
"api_user": "postmaster@sendcloud.io",
"label_id": 0
}
},
"custom_args": {}
}
Email response callback
URL
User-defined filling on the page
Content-Type:
application/json; charset=utf-8
HTTP Request Method
post
Request Headers
Header | Type | Required | Description |
---|---|---|---|
X-WebHook-Timestamp | String | true | timestamp |
X-WebHook-AppKey | String | true | fixed value:“email” |
X-WebHook-Signature | String | true | digital signature |
Request Body
Parameter | Type | Description |
---|---|---|
message_id | string | message id |
to | string | recipient |
server | string | |
itime | long | message generation timestamp |
custom_args | json | customer-defined fields |
response | json | message response callback |
Tips:
- Signature algorithm: use the user app key as the encryption key to perform HmacSHA256 operation on the timestamp time to obtain hexadecimal characters.
Email open response message
Trigger condition:The recipient opens the email.
response
Parameter | Type | Description |
---|---|---|
event | string | open |
response_data | json object | response data |
message | string | open email |
task_id | int | task id |
api_user | string | api user |
email_id | string | email id |
label_id | int | label id |
ip | string | operation IP |
explorer_name | string | browser name |
explorer_ver | string | browser version |
os_name | string | OS name |
os_ver | string | OS version |
{
"server": "email",
"message_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com",
"to": "12345@hotmail.com",
"itime": 1676620370426,
"response": {
"event": "open",
"response_data": {
"email_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com",
"explorer_ver": "101.0.4951",
"os_ver": "8",
"explorer_name": "Chrome",
"ip": "8.219.124.204",
"os_name": "Windows",
"task_id": "0",
"api_user": "JGgkm3wedVik_test_y1mQMX",
"message": "open email",
"label_id": 0
}
},
"custom_args": {}
}
Email click response message
Trigger condition:The recipient clicks on the email link.
response
Parameter | Type | Description |
---|---|---|
event | string | click |
response_data | json object | response data |
message | string | click email |
task_id | int | task id |
api_user | string | api user |
email_id | string | email id |
label_id | int | label id |
url | string | click url |
ip | string | operation IP |
explorer_name | string | browser name |
explorer_ver | string | browser version |
os_name | string | OS name |
os_ver | string | OS version |
{
"server": "email",
"message_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com",
"to": "12345@hotmail.com",
"itime": 1676620370426,
"response": {
"event": "click",
"response_data": {
"email_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com",
"explorer_ver": "101.0.4951",
"os_ver": "8",
"explorer_name": "Chrome",
"ip": "8.219.124.204",
"url": "https://www.engagelab.com/zh_CN/email/",
"os_name": "Windows",
"task_id": "0",
"api_user": "JGgkm3wedVik_test_y1mQMX",
"message": "click email",
"label_id": 0
}
},
"custom_args": {}
}
Email unsubscribe response message
Trigger condition:The recipient clicks to unsubscribe.
response
Parameter | Type | Description |
---|---|---|
event | string | unsubscribe |
response_data | json object | response data |
message | string | unsubscribe email |
task_id | int | task id |
api_user | string | api user |
email_id | string | email id |
label_id | int | label id |
ip | string | operation IP |
explorer_name | string | browser name |
explorer_ver | string | browser version |
os_name | string | OS name |
os_ver | string | OS version |
{
"server": "email",
"message_id": "1676460128030_100669_28018_8253.sg-10_1_253_26-inbound86$12345@gmail.com",
"to": "12345@gmail.com",
"itime": 1676623616503,
"response": {
"event": "unsubscribe",
"response_data": {
"email_id": "1676460128030_100669_28018_8253.sg-10_1_253_26-inbound86$12345@gmail.com",
"explorer_ver": "16.2",
"os_ver": "16.2",
"explorer_name": "Mobile Safari",
"ip": "80.14.210.102",
"os_name": "iOS",
"task_id": "0",
"api_user": "1224_xjm",
"message": "unsubscribe email",
"label_id": 221223
}
},
"custom_args": {}
}
Email report_spam respnse message
Trigger condition:The recipient reports email as a spam.
response
Parameter | Type | Description |
---|---|---|
event | string | report_spam |
response_data | json object | response data |
api_user | string | api user |
email_id | string | email id |
label_id | int | label id |
{
"server": "email",
"message_id": "1676857822846_15_23558_89.sg-10_1_253_26-inbound0$12345@gmail.com",
"to": "12345@gmail.com",
"itime": 1677548340323,
"response": {
"event": "report_spam",
"response_data": {
"email_id": "1676857822846_15_23558_89.sg-10_1_253_26-inbound0$1406064670@gmail.com",
"api_user": "huangli",
"label_id": 0
}
},
"custom_args": {}
}
Email route response message
Trigger condition:The recipient reply or send to receiving route.
response
Parameter | Type | Description |
---|---|---|
event | string | route |
response_data | json object | response data |
message | string | mx route |
html | string | email html |
text | string | email plain text |
headers | string | route email header |
from_name | string | from name |
subject | string | email subject |
from | string | from address |
reference | string | reference |
email_id | string | email id |
raw_message | string | raw message |
raw_message_url | string | raw message download url |
x_mx_mailfrom | string | x_mx_mailfrom |
x_mx_rcptto | string | x_mx_rcptto |
{
"server": "email",
"message_id": "01b6f68b-da52-4f6f-a049-68d0ca01dd8c",
"to": "Goblin <12345@gmail.com>;Illidan <12345@hotmail.com>",
"itime": 1676618346192,
"response": {
"event": "route",
"response_data": {
"headers": {
"Cc": "Malfurion <12345@gmail.com>",
"To": "Goblin <12345@gmail.com>",
"Content-Type": "multipart/alternative; boundary=\"00000000000092f9ca05f4e02010\"",
"From": "Archimonde <12345@outlook.com>",
"MIME-Version": "1.0",
"Date": "Fri, 17 Feb 2023 12:48:48 +0530",
"Subject": "Re: Work plan for next month"
},
"raw_message": "Received: from MAIL-ED1-F51.GOOGLE.COM (unknown [209.85.208.51])by mx2.sendcloud.org with SMTP ......",
"subject": "Re: Work plan for next month",
"x_mx_rcptto": "12345@icloud.com",
"html": "<div dir=\"ltr\">Hi Team,<div><br></div><div>Let's start ......",
"from": "Archimonde <12345@outlook.com>",
"text": "Hi Team,Let's start ......",
"x_mx_mailfrom": "12345@hotmail.com",
"message": "mx route",
"from_name": "Sargeras",
"raw_message_url": "https://......eml"
}
},
"custom_args": {}
}