Skip to main content

Overview

Webhooks allow you to receive real-time notifications about message delivery status (DLR) and incoming messages (MO). Instead of polling the API, your server receives HTTP POST requests when events occur.
1

Create a webhook subscription

Register your webhook endpoint with the events you want to receive.
Response:
Your webhook URL must be publicly accessible and use HTTPS in production.
2

Handle incoming DLR payloads

Create an endpoint to receive and process delivery report webhooks.Delivery Report (DLR) Payload:
Node.js Express Handler:
Python Flask Handler:
Always respond with HTTP 200 OK within 5 seconds. Failed webhook deliveries will be retried up to 5 times with exponential backoff.
3

Test your webhook

Use the test endpoint to verify your webhook is working correctly.
This will send a test DLR payload to your webhook URL:

Message Status Lifecycle

Webhook Event Types

Delivery Report (DLR)

Sent when a message status changes.

Mobile Originated (MO)

Sent when you receive an incoming message.

Security Best Practices

Always verify the X-Webhook-Signature header to ensure requests are from NativeMessage.
Always use HTTPS for webhook URLs in production to prevent man-in-the-middle attacks.
Store processed webhook IDs to prevent duplicate processing during retries.
NativeMessage retries failed webhooks up to 5 times with exponential backoff:
  • 1st retry: 1 minute
  • 2nd retry: 5 minutes
  • 3rd retry: 15 minutes
  • 4th retry: 1 hour
  • 5th retry: 6 hours

Next Steps

Webhook API Reference

Explore all webhook subscription management endpoints

Error Codes

Learn about DLR error codes and troubleshooting