WebHook

最新更新:2023-03-14

郵件狀態回檔

URL

用戶 web 頁面自定義填寫
          用戶 web 頁面自定義填寫

        
此代碼塊在浮窗中顯示

Content-Type:

application/json; charset=utf-8
          application/json; charset=utf-8

        
此代碼塊在浮窗中顯示

HTTP 請求方式

post
          post

        
此代碼塊在浮窗中顯示

請求 Headers

Header Type Required Description
X-WebHook-Timestamp String true 時間戳記
X-WebHook-AppKey String true 固定值:“email”
X-WebHook-Signature String true 數位簽章

請求 Body

參數 類型 說明
message_id string 消息 id
to string 收件人(target 消息中為空)
server string email
itime long 消息產生時間戳記
custom_args json 客戶自定義欄位
status json 消息狀態回檔

注意:

  • 簽名算灋:以用戶 app key 為加密金鑰對時間戳記 itime 進行 HmacSHA256 運算,得到十六進位字符。

郵件 target 狀態消息

status

參數 類型 說明
message_status string target
status_data json object 狀態數據
message string successfully request
task_id int 任務 id
api_user string api user
tos array 收信人數組
email_ids array 收信人 email id 數組
label_id int 標籤 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 } } }
          {
    "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
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件 sent 狀態消息

status

參數 類型 說明
message_status string sent
status_data json object 狀態數據
message string Successfully sent
task_id int 任務 id
api_user string api user
email_id string 郵件 id
label_id int 標籤 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 } } }
          {
    "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
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件 delivered 狀態消息

status

參數 類型 說明
message_status string delivered
status_data json object 狀態數據
message string successfully delivered
task_id int 任務 id
api_user string api user
email_id string 郵件 id
label_id int 標籤 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 } } }
          {
    "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
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件 delivered_failed 狀態消息

status

參數 類型 說明
message_status string delivered_failed
status_data json object 狀態數據
task_id int 任務 id
api_user string api user
email_id string 郵件 id
label_id int 標籤 id
error_code int 錯誤代碼
error_detail json 錯誤明細
message string 郵箱返回日誌
sub_stat int 錯誤子類,4xx 表示大類為無效郵件 5XX 表示大類為軟退信
sub_stat_desc string 錯誤分類
{ "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": "delivered_failed", "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 } } }
          {
    "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": "delivered_failed", 
        "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
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件 open 狀態消息

status

參數 類型 說明
message_status string open
status_data json object 狀態數據
message string open email
task_id int 任務 id
api_user string api user
email_id string 郵件 id
label_id int 標籤 id
{ "server": "email", "message_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com", "to": "12345@hotmail.com", "itime": 1676618644458, "status": { "message_status": "open", "status_data": { "email_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com", "task_id": "0", "api_user": "JGgkm3wedVik_test_y1mQMX", "message": "open email", "label_id": 0 } } }
          {
    "server": "email", 
    "message_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com", 
    "to": "12345@hotmail.com", 
    "itime": 1676618644458, 
    "status": {
        "message_status": "open", 
        "status_data": {
            "email_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com", 
            "task_id": "0", 
            "api_user": "JGgkm3wedVik_test_y1mQMX", 
            "message": "open email", 
            "label_id": 0
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件 click 狀態消息

status

參數 類型 說明
message_status string click
status_data json object 狀態數據
message string click email
task_id int 任務 id
api_user string api user
email_id string 郵件 id
label_id int 標籤 id
{ "server": "email", "message_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com", "to": "12345@hotmail.com", "itime": 1676618644458, "status": { "message_status": "click", "status_data": { "email_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com", "task_id": "0", "api_user": "JGgkm3wedVik_test_y1mQMX", "message": "click email", "label_id": 0 } } }
          {
    "server": "email", 
    "message_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com", 
    "to": "12345@hotmail.com", 
    "itime": 1676618644458, 
    "status": {
        "message_status": "click", 
        "status_data": {
            "email_id": "1676618583015_104117_18546_8822.sc-10_43_7_16-inbound0$12345@hotmail.com", 
            "task_id": "0", 
            "api_user": "JGgkm3wedVik_test_y1mQMX", 
            "message": "click email", 
            "label_id": 0
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件響應回檔

URL

用戶自定義
          用戶自定義

        
此代碼塊在浮窗中顯示

Content-Type:

application/json; charset=utf-8
          application/json; charset=utf-8

        
此代碼塊在浮窗中顯示

HTTP 請求方式

post
          post

        
此代碼塊在浮窗中顯示

請求 Headers

Header Type Required Description
X-WebHook-Timestamp String true 時間戳記
X-WebHook-AppKey String true 固定值:“email”
X-WebHook-Signature String true 數位簽章

請求 Body

參數 類型 說明
message_id string 消息 id
to string 收信人
server string email
itime long 消息產生時間戳記
custom_args json 客戶自定義欄位
response json 消息響應回檔

注意:

  • 簽名算法:以用户 api key 为加密密钥对时间戳 itime 进行 HmacSHA256 运算,得到十六进制字符。

郵件取消訂閱響應消息

response

參數 類型 說明
event string unsubscribe
response_data json object 響應數據
message string unsubscribe email
task_id int 任務 id
api_user string api user
email_id string 郵件 id
label_id int 標籤 id
ip string 操作 IP
explorer_name string 瀏覽器名稱
explorer_ver string 流覽器版本
os_name string 作業系統名稱
os_ver string 作業系統版本
{ "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 } } }
          {
    "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
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件垃圾举报響應消息

response

參數 類型 說明
event string report_spam
response_data json object 響應數據
api_user string api user
email_id string 郵件 id
label_id int 標籤 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 } } }
          {
    "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
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件 open 響應消息

response

參數 類型 說明
event string open
response_data json object 響應數據
message string open email
task_id int 任務 id
api_user string api user
email_id string 郵件 id
label_id int 標籤 id
ip string 操作 IP
explorer_name string 瀏覽器名稱
explorer_ver string 流覽器版本
os_name string 作業系統名稱
os_ver string 作業系統版本
{ "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 } } }
          {
    "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
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件 click 響應消息

response

參數 類型 說明
event string click
response_data json object 響應數據
message string click email
task_id int 任務 id
api_user string api user
email_id string 郵件 id
label_id int 標籤 id
url string 点击 url
ip string 操作 IP
explorer_name string 瀏覽器名稱
explorer_ver string 流覽器版本
os_name string 作業系統名稱
os_ver string 作業系統版本
{ "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_TW/email/", "os_name": "Windows", "task_id": "0", "api_user": "JGgkm3wedVik_test_y1mQMX", "message": "click email", "label_id": 0 } } }
          {
    "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_TW/email/", 
            "os_name": "Windows", 
            "task_id": "0", 
            "api_user": "JGgkm3wedVik_test_y1mQMX", 
            "message": "click email", 
            "label_id": 0
        }
    }
}

        
此代碼塊在浮窗中顯示

郵件轉信響應消息

response

參數 類型 說明
event string route
response_data json object 響應數據
message string mx route
html string 郵件 html 原文
text string 郵件 plain 原文
headers string 转信郵件 header
from_name string 发信人名称
subject string 郵件主题
from string 发信人地址
reference string reference
email_id string 郵件 id
raw_message string 郵件原文
raw_message_url string 郵件原文下载地址
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" } } }
          {
    "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"
        }
    }
}

        
此代碼塊在浮窗中顯示
在文档中心打开
icon
Contact Sales