WebHook
🇬🇧 English
Overview
BizMail automatically pushes real-time email delivery events to your webhook URL configured in the BizMail Portal.
When an email changes status (delivered, bounced, dropped), BizMail sends an HTTP POST request to your endpoint with a JSON payload describing the event.
Configuration
Configure your webhook URL and which events to receive in the BizMail Portal under your account settings. You can register separate webhook URLs per event type.
Events
Payload Structure
BizMail sends different payload shapes depending on the event type.
Event: delivered
Triggered when an email is successfully delivered.
Event: bounced
Triggered when an email bounces. Includes a category field to distinguish hard and soft bounce.
Category values:
Event: dropped
Triggered when an email is dropped (suppressed before sending).
Webhook Request Details
BizMail sends events as HTTP POST requests to your configured URL.
Headers:
Your endpoint must respond with HTTP 2xx to acknowledge receipt. If your endpoint does not respond or returns a non-2xx status, BizMail may retry the delivery.
Example Receiver (PHP)
Example Receiver (Node.js / Express)
🇻🇳 Tiếng Việt
Tổng quan
BizMail tự động đẩy các sự kiện tracking email theo thời gian thực đến webhook URL được cấu hình trong BizMail Portal.
Khi email thay đổi trạng thái (delivered, bounced, dropped), BizMail gửi HTTP POST request đến endpoint của bạn kèm JSON payload mô tả sự kiện.
Cấu hình
Cấu hình webhook URL và các sự kiện cần nhận trong BizMail Portal tại phần cài đặt tài khoản. Bạn có thể đăng ký webhook URL riêng cho từng loại sự kiện.
Các sự kiện
Cấu trúc Payload
BizMail gửi payload có cấu trúc khác nhau tùy theo loại sự kiện.
Sự kiện: delivered
Kích hoạt khi email được gửi thành công.
Sự kiện: bounced
Kích hoạt khi email bị bounce. Có trường category phân biệt hard/soft bounce.
Giá trị category:
Sự kiện: dropped
Kích hoạt khi email bị hủy (bị chặn trước khi gửi).
Chi tiết Webhook Request
BizMail gửi sự kiện qua HTTP POST đến URL đã cấu hình.
Headers:
Endpoint của bạn phải trả về HTTP 2xx để xác nhận nhận được. Nếu không phản hồi hoặc trả về non-2xx, BizMail có thể thử gửi lại.