A webhook is a way for one application to automatically notify another when a specific event occurs. Instead of your server constantly polling SmsGateWay24 to check for new events (like incoming SMS or delivery status changes), SmsGateWay24 sends an HTTP POST request to a URL you specify the moment an event happens. This is faster, more efficient, and requires less server load.
Think of webhooks as a push notification for your server: instead of you asking "Did anything happen?", SmsGateWay24 tells you "Here is what just happened."
When you send an SMS through SmsGateWay24, the message goes through several stages: queued, sent, and delivered (or failed). Every time the delivery status changes, SmsGateWay24 can notify your server via webhook. This allows you to:
When someone replies to an SMS sent from your device, or sends a new message to your SIM card's phone number, SmsGateWay24 detects the incoming SMS and sends a webhook to your server. The webhook payload includes the sender's phone number, the message text, the timestamp, and the device ID. This enables two-way SMS communication in your application.
You need a publicly accessible URL on your server that can receive HTTP POST requests. This endpoint should:
Content-Type: application/jsonExample endpoint in PHP:
SmsGateWay24 provides a test button to send a sample webhook payload to your URL. Use this to verify your endpoint is reachable and correctly parsing the data before going live.
{
"event": "delivery_status",
"message_id": "abc123",
"phone": "+1234567890",
"status": "delivered",
"timestamp": "2026-01-15T10:30:00Z",
"device_id": "device_xyz"
}
{
"event": "incoming_sms",
"phone": "+1234567890",
"message": "Hello, I need help with my order",
"timestamp": "2026-01-15T10:31:00Z",
"device_id": "device_xyz"
}
Use incoming SMS webhooks to build a simple SMS-based customer support system. When a customer replies to your message, the webhook fires and your system can log the reply, notify the support agent, or trigger an automated response.
Update a delivery status indicator in your web application in real time when the delivery webhook fires. Instead of showing "Pending" indefinitely, users see "Delivered" the moment the carrier confirms it.
If users can reply to your OTP SMS with a specific keyword (e.g., "VERIFY"), the incoming SMS webhook allows your server to detect this reply and automatically advance the user through the verification flow.
application/json content type.