Webhook

Webhook可以將伺服器和聯絡人名單事件幾乎即時同步。聯絡人名單的 webhooks 會將更新數據 發布 在給定的 URL 中。你可以在聯絡人名單中選擇事件以啟動 webhook。

如果你還不太了解這是什麼,建議你閱讀 PBWiki Webhooks 以供參考。


由此開始
  1. 登入 Benchmark Email 帳戶
  2. 點選[聯絡人群組]索引標籤
  3. 點選欲設置的聯絡人名單
  4. 在名單操作選項中點選[webhook]

設置 webhook
  1. 給定事件發生時發布數據的 URL
  2. 選擇 webhook 的觸發事件
  3. 點選[Add Webhook]以儲存變更
新增 webhook 之後,你也可以新增新的 webhook 或更新/刪除既有的 webhook

聯絡人名單觸發事件

Benchmark Email 容許在以下事件發生時觸發 webhook:

發布數據

一旦選定的事件發生,webhook 就會將觸發事件的相關數據以 HTTP POST 形式發布在給定的URL中。
數據會以 key / value 配對發布

其下會列出事件的數據



Subscribes
Key Value (sample)
type subscribe Type of the Trigger
fired_at 11/9/2011 12:42:35 PM Time of the event
list_id 999 The List ID (refer to the API)
email test@benchmarkemail.com Email address which was subscribed
optin 1 - If the email was opted in
optin_ip The IP of the opt in email
optin_date The subscription date for the opt in email
First_Name Peter First name (contact attribute)
Last_Name Parker Last name (contact attribute)
Last_Name Parker Last name (contact attribute)
Middle_Name contact attribute
Job_Title contact attribute
Company_Name contact attribute
Address contact attribute
City contact attribute
State contact attribute
Zip contact attribute
Country contact attribute
Cell_Phone contact attribute
Phone contact attribute
Fax contact attribute
Notes contact attribute
Business_Address contact attribute
Business_City contact attribute
Business_State contact attribute
Business_Zip contact attribute
Business_Country contact attribute
Business_Phone contact attribute
Business_Fax contact attribute
Extra_1 contact attribute
Extra_2 contact attribute
Extra_3 contact attribute
Extra_4 contact attribute
Extra_5 contact attribute
Extra_6 contact attribute


Unsubscribes
Key Value (sample)
type unsubscribe Type of the Trigger
fired_at 11/9/2011 12:42:35 PM Time of the event
list_id 999 The List ID (refer to the API)
email test@benchmarkemail.com Email address which was subscribed
action unsub
reason manual
optin 1 - If the email was opted in
optin_ip The IP of the opt in email
optin_date The subscription date for the opt in email
First_Name Peter First name (contact attribute)
Last_Name Parker Last name (contact attribute)
Last_Name Parker Last name (contact attribute)
Middle_Name contact attribute
Job_Title contact attribute
Company_Name contact attribute
Address contact attribute
City contact attribute
State contact attribute
Zip contact attribute
Country contact attribute
Cell_Phone contact attribute
Phone contact attribute
Fax contact attribute
Notes contact attribute
Business_Address contact attribute
Business_City contact attribute
Business_State contact attribute
Business_Zip contact attribute
Business_Country contact attribute
Business_Phone contact attribute
Business_Fax contact attribute
Extra_1 contact attribute
Extra_2 contact attribute
Extra_3 contact attribute
Extra_4 contact attribute
Extra_5 contact attribute
Extra_6 contact attribute


Changes to the profile
Key Value (sample)
type profile Type of the Trigger
fired_at 11/9/2011 12:42:35 PM Time of the event
list_id 999 The List ID (refer to the API)
email test@benchmarkemail.com Email address of the updated record
optin 1 - If the email was opted in
optin_ip The IP of the opt in email
optin_date The subscription date for the opt in email
First_Name Peter First name (contact attribute)
Last_Name Parker Last name (contact attribute)
Last_Name Parker Last name (contact attribute)
Middle_Name contact attribute
Job_Title contact attribute
Company_Name contact attribute
Address contact attribute
City contact attribute
State contact attribute
Zip contact attribute
Country contact attribute
Cell_Phone contact attribute
Phone contact attribute
Fax contact attribute
Notes contact attribute
Business_Address contact attribute
Business_City contact attribute
Business_State contact attribute
Business_Zip contact attribute
Business_Country contact attribute
Business_Phone contact attribute
Business_Fax contact attribute
Extra_1 contact attribute
Extra_2 contact attribute
Extra_3 contact attribute
Extra_4 contact attribute
Extra_5 contact attribute
Extra_6 contact attribute


Cleaning of the email
Key Value (sample)
type cleaned Type of the Trigger
fired_at 11/9/2011 12:42:35 PM Time of the event
list_id 999 The List ID (refer to the API)
email cleaned
reason


Change of the existing email address
Key Value (sample)
type upemail Type of the Trigger
fired_at 11/9/2011 12:42:35 PM Time of the event
list_id 999 The List ID (refer to the API)
old_email test@benchmarkemail.com Email address of the record to be updated
email test123@benchmarkemail.com Updated email address
optin 1 - If the email was opted in
optin_ip The IP of the opt in email
optin_date The subscription date for the opt in email
First_Name Peter First name (contact attribute)
Last_Name Parker Last name (contact attribute)
Last_Name Parker Last name (contact attribute)
Middle_Name contact attribute
Job_Title contact attribute
Company_Name contact attribute
Address contact attribute
City contact attribute
State contact attribute
Zip contact attribute
Country contact attribute
Cell_Phone contact attribute
Phone contact attribute
Fax contact attribute
Notes contact attribute
Business_Address contact attribute
Business_City contact attribute
Business_State contact attribute
Business_Zip contact attribute
Business_Country contact attribute
Business_Phone contact attribute
Business_Fax contact attribute
Extra_1 contact attribute
Extra_2 contact attribute
Extra_3 contact attribute
Extra_4 contact attribute
Extra_5 contact attribute
Extra_6 contact attribute