Webhooks
Receive delivery events at an HTTPS endpoint you control.
Events
| Event | Sent when |
|---|---|
message.sent | The provider accepted the message |
message.delivered | Delivery was confirmed |
message.bounced | The recipient address or number rejected it |
message.opened | E-mail was opened (when tracking is enabled) |
Verifying signatures
Each request carries an Amantiz-Signature header, an HMAC-SHA256 of the raw body with your webhook secret. Compare it in constant time and reject requests older than five minutes.
import hmac, hashlib
def valid(body: bytes, header: str, secret: bytes) -> bool:
digest = hmac.new(secret, body, hashlib.sha256).hexdigest()
return hmac.compare_digest(digest, header)Retries
Respond with any 2xx status within 10 seconds. Failed deliveries are retried with exponential back-off for up to 24 hours (1 min, 5 min, 30 min, 2 h, then every 6 h).