Setup Webhook Anda
Di menu webhook Mailtarget, Anda dapat dengan mudah mengirimkan event pesan langsung ke endpoint Anda. Namun, Anda perlu mengelola endpoint Anda di sini dengan mengklik tombol Create Webhook.
Ikuti dan lengkapi langkah-langkah untuk menambahkan webhook Anda di Mailtarget. Masukkan nama webhook, URL target, sumber aktivitas penerima, dan Anda dapat memilih aktivitas apa yang ingin Anda lacak. Semua aktivitas atau aktivitas tertentu tergantung pada kebutuhan Anda. Mailtarget dapat melacak:
Bounce
Delay
Injection
Open
Click
Delivery
Kemudian, Anda dapat mengatur metode autentikasi:
None = URL target tidak memiliki skema autentikasi.
Basic auth = Username dan password yang terkait dengan URL target akan dikirimkan melalui header selama permintaan. Jika Anda memilih Basic auth, Anda harus memasukkan username dan password untuk autentikasi.
Setelah membuat webhook Anda, status defaultnya adalah Enable. Namun, Anda dapat mengubah status menjadi Disable dengan mengklik nama webhook, klik tombol Edit Webhook, lalu ubah statusnya menjadi Disable.
Menguji Webhook Anda
Di detail webhook Anda, terdapat informasi tentang pengaturan terbaru Anda, dan terdapat 3 menu yang dapat Anda akses dan coba, salah satunya adalah menu Test.
Di sini, Anda dapat menguji pengiriman ke webhook Anda dengan mengklik tombol Send Test Batch. Jika pengiriman berhasil, akan muncul notifikasi Success send test notification.
Jika gagal, akan muncul notifikasi Failed send test notification.
{
"batchId": "645c2177e3b86a0001887bc6",
"retryCount": 0,
"events": [
{
"status": "injection",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"timestamp": 1460989507000
},
{
"status": "delivery",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"ipAddress": "18.236.253.72",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"timestamp": 1460989507000,
"injectionTime": 1460989507000
},
{
"status": "open",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"ipAddress": "18.236.253.72",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36",
"geoIp": "{\"country\":\"US\",\"region\":\"MD\",\"city\":\"Columbia\",\"latitude\":39.1749,\"longitude\":-76.8375,\"zip\":21046,\"postal_code\":\"21046\"}",
"timestamp": 1460989507000,
"injectionTime": 1460989507000
},
{
"status": "click",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"ipAddress": "18.236.253.72",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"targetLinkUrl": "http://example.com",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36",
"geoIp": "{\"country\":\"US\",\"region\":\"MD\",\"city\":\"Columbia\",\"latitude\":39.1749,\"longitude\":-76.8375,\"zip\":21046,\"postal_code\":\"21046\"}",
"timestamp": 1460989507000,
"injectionTime": 1460989507000
},
{
"status": "delay",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"ipAddrss": "18.236.253.72",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"bounceClass": "1",
"numRetries": "2",
"timestamp": 1460989507000,
"rawReason": "MAIL REFUSED - IP (17.99.99.99) is in black list",
"reason": "MAIL REFUSED - IP (a.b.c.d) is in black list",
"injectionTime": 1460989507000
},
{
"status": "bounce",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"ipAddress": "18.236.253.72",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"bounceClass": "1",
"numRetries": "2",
"timestamp": 1460989507000,
"rawReason": "MAIL REFUSED - IP (17.99.99.99) is in black list",
"reason": "MAIL REFUSED - IP (a.b.c.d) is in black list",
"injectionTime": 1460989507000
},
{
"status": "spam_complaint",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"ipAddress": "18.236.253.72",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"fbType": "abuse",
"reportBy": "server.email.com",
"reportTo": "abuse.example.com",
"timestamp": 1677553569000,
"injectionTime": 1460989507000
},
{
"status": "link_unsubscribe",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"ipAddress": "18.236.253.72",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"timestamp": 1460989507000,
"injectionTime": 1460989507000,
"targetLinkUrl": "http://example.com",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"
},
{
"status": "list_unsubscribe",
"eventId": "92356927693813856",
"messageId": "000443ee14578172be22",
"subject": "Holiday deals are here!",
"sender": "[email protected]",
"sendingIp": "18.236.253.72",
"recipient": "[email protected]",
"recipientMeta": "{\"customKey\":\"customValue\"}",
"ipAddress": "18.236.253.72",
"mailboxProvider": "Gsuite",
"recipientDomain": "example.com",
"recipientType": "cc",
"timestamp": 1460989507000,
"injectionTime": 1460989507000
}
]
}
Status Batch Webhook
Menu Batch Status di Mailtarget digunakan untuk menampilkan status webhook yang telah Anda hubungkan dengan Mailtarget. Menu ini memberikan detail mengenai data waktu pengiriman ke webhook, ID batch, status, jumlah percobaan, dan respons yang diterima dari webhook Anda.
Harap dicatat bahwa jika webhook Anda gagal, sistem akan mencoba mengirim ulang hingga 7 kali. Jika terus gagal, Anda akan menerima email notifikasi otomatis untuk menyelesaikan masalah tersebut. Jika tidak ada perbaikan dalam waktu 7 jam, webhook akan dinonaktifkan.