Prompt
I'm building a product notification system and need webhooks for bounces and opens
Latest observation
Nov 9, 2026
OpenAI APIWeb search: off
Absolutely — for a product notification system, the two common webhook events you’ll want are:
email.bouncedemail.opened
Here’s a practical design you can use.
1) Webhook event shapes
Bounce event
{
"id": "evt_01JABC123XYZ",
"type": "email.bounced",
"created_at": "2026-11-09T12:34:56Z",
"data": {
"message_id": "msg_12345",
"recipient": "user@example.com",
"bounce_type": "hard",
"reason": "Invalid recipient address",
"smtp_code": "550",
"smtp_message": "Requested action not taken: mailbox unavailable",
"provider": "ses"
}
}
Open event
{
"id": "evt_01JABC456XYZ",
"type": "email.opened",
"created_at": "2026-11-09T12:35:10Z",
"data": {
"message_id": "msg_12345",
"recipient": "user@example.com",
"opened_at": "2026-11-09T12:35:10Z",
"provider": "ses",
"user_agent": "Mozilla/5.0",
"ip_address": "203.0.113.10"
}
}
2) Recommended webhook delivery rules
- Send events as
POSTrequests withContent-Type: application/json - Include an event ID for idempotency
- Retries with exponential backoff on non-2xx responses
- Sign payloads with HMAC so consumers can verify authenticity
- Deduplicate on
idto avoid repeated processing
3) Suggested headers
X-Webhook-Event-Id: evt_01JABC123XYZ
X-Webhook-Event-Type: email.bounced
X-Webhook-Timestamp: 1731155696
X-Webhook-Signature: sha256=...
4) Signature verification approach
Example signing input:
timestamp + "." + raw_request_body
Then compute:
HMAC_SHA256(secret, signing_input)
5) Minimal endpoint contract
Consumers should respond with:
2xx= accepted4xx/5xx= retry according to your policy
6) Common bounce subtypes
It helps to distinguish:
hardbounce: permanent failuresoftbounce: temporary failurespamorcomplaintif you later add feedback loops
7) Optional extra fields
You may want to include:
tenant_idcampaign_idtemplate_idprovider_event_iddelivery_attempt
If you want, I can also generate:
- an OpenAPI spec for these webhooks,
- sample code for signing/verifying payloads, or
- a full event schema for bounce/open/delivery/complaint.
Brands