HTTP Web Push DLR
The Ruach SMS API supports HTTP web push delivery reports (DLR) to provide real-time status updates for your SMS messages.Overview
When HTTP Web push DLR is enabled, you can configure a webhook URL to receive delivery status updates in real-time. The system will send HTTP requests to your specified endpoint with delivery information.Webhook Configuration
To enable webhook delivery reports:- Contact support to enable DLR for your account
- Provide your webhook URL to receive delivery reports
- Ensure your endpoint responds with
200 OKwithin 10 seconds
Webhook Request Format
Each delivery report is sent as a GET request to your webhook URL with the following parameters:Parameters
Unique message ID of the SMS
Mobile number that received the message
Date and time when the message was submitted
Date and time when the message was processed
Current delivery status of the message
Error code (if any)
The original message text
Delivery Status Values
| Status | Description |
|---|---|
| DELIVRD | Message successfully delivered |
| UNDELIV | Message undelivered |
| EXPIRED | Message expired |
| DELETED | Message deleted |
| UNKNOWN | Status unknown |
| ACCEPTD | Message accepted by carrier |
| REJECTD | Message rejected |
| BLACKLIST | Number is blacklisted |
Example Webhook Implementation
Best Practices
1. Fast Response Time
- Ensure your webhook endpoint responds within 10 seconds
- Use asynchronous processing for heavy operations
- Return
200 OKimmediately after receiving the request
2. Idempotency
- Handle duplicate webhook calls gracefully
- Use messageId as a unique identifier
- Implement proper deduplication logic
3. Error Handling
- Log all webhook requests for debugging
- Implement retry logic for failed processing
- Monitor webhook endpoint health
4. Security
- Validate webhook requests
- Use HTTPS for your webhook endpoint
- Implement authentication if needed
Testing Webhooks
You can test your webhook endpoint using curl:Use Cases
- Real-time tracking: Monitor message delivery status in real-time
- Analytics: Track delivery rates and performance metrics
- Customer service: Provide delivery confirmations to customers
- Retry logic: Automatically retry failed messages
- Compliance: Maintain delivery logs for regulatory requirements

