Webhooks are a way to receive HTTP POST requests from Hyvor Relay when certain events occur. They are useful to sync state (email sending status) between Hyvor Relay and your application or to trigger actions in your application based on events in Hyvor Relay.
send.accepted
is triggered when an email is accepted by the recipient SMTP server.
This can only be triggered once for a send. It indicates that the email has been successfully
delivered to the recipient's server, but it does not guarantee that the email has been delivered
to the recipient's inbox. send.bounced
or send.complained
can be triggered
later if the email is not delivered to the recipient's inbox (ex: when the mailbox is full, or if
the email provider's spam detector detects the mail as spam) or if the recipient marks it as spam.
{
send: Send;
attempt: SendAttempt;
}
send.deferred
is triggered when an email is temporarily deferred by the recipient
SMTP server. This can happen for various reasons, such as the recipient's server being busy or
because of greylisting. Hyvor Relay will
retry sending the email a few more times before giving up. You can expect a send.accepted
or send.bounced
event later.
{
send: Send;
attempt: SendAttempt;
}
send.bounced
is triggered when an email is permanently rejected by the recipient SMTP
server. This can happen for various reasons, such as the recipient's email address not existing or
the recipient's server rejecting the email due to spam filters.
send.bounced
event is triggered immediately.send.accepted
event is triggered first,
followed by the send.bounced
event when the bounce is detected.If we detect a hard bounce (permanent failure) for a send, the email address is automatically added to your project's suppression list. This means that you cannot send emails to that email address again unless you manually remove it from the suppression list. This is to prevent sending emails to invalid email addresses, which can harm your sender reputation.
{
send: Send;
attempt: SendAttempt | null;
bounce: Bounce;
}
When a recipient marks an email as spam, the email provider sends a complaint, called a Feedback
Loop (FBL), to Hyvor Relay. Hyvor Relay is configured to receive FBLs from major email
providers.bind: We process these complaints and trigger the send.complained
event. This
event indicates that the recipient has marked the email as spam or junk. When this event is triggered,
the email address is automatically added to your project's suppression list, similar to when a hard
bounce occurs.
{
send: Send;
complaint: Complaint;
}
When Hyvor Relay sends a webhook, it expects a 2xx
HTTP response code from your
application. If it does not receive a 2xx
response, it will retry sending the webhook
up to 6 times with the following intervals between retries:
If all retries fail, the webhook delivery will be marked as failed, and you can view the delivery status in the Hyvor Relay Console, including the error message received from your server.