Prompt
How do I add delivery status webhooks for notifications?
Latest observation
Oct 14, 2026
OpenAI APIWeb search: off
To add delivery status webhooks for notifications, you generally need to:
- Create a webhook endpoint on your server
- Register that endpoint in your notification provider’s dashboard or API
- Subscribe to delivery status events like
delivered,failed,bounced, oropeneddepending on the provider - Verify and process incoming webhook requests securely
Typical setup
1) Build a webhook receiver
Your endpoint should accept POST requests, for example:
POST /webhooks/notification-status
It should:
- Return
2xxquickly - Parse the event payload
- Log or store status updates
- Be publicly reachable over HTTPS
2) Register the webhook URL
In your provider settings, add the URL of your endpoint, e.g.:
https://yourdomain.com/webhooks/notification-status
Some systems also let you set:
- A signing secret
- Event types to subscribe to
- Retry behavior
3) Handle delivery event payloads
A typical webhook payload might look like:
{
"event": "notification.delivered",
"notification_id": "ntf_123",
"recipient": "+15551234567",
"timestamp": "2026-10-14T12:34:56Z"
}
Your handler would:
- Validate the signature
- Match the
notification_idto your sent notification - Update status in your database
4) Secure it
Best practices:
- Verify signatures/HMAC headers
- Use HTTPS only
- Reject unsigned or malformed requests
- Make the handler idempotent to handle retries
Example workflow
- You send a notification
- Provider processes delivery
- Provider sends a webhook to your endpoint
- Your app updates the notification status
If you’re using a specific provider
The exact steps depend on the platform (for example, Twilio, SendGrid, Firebase, OneSignal, AWS SNS, etc.).
If you tell me which notification service you’re using, I can give you the exact steps and sample code.