callback_url you provided in your original send request. Use these events to update your records, notify your users, or trigger follow-up workflows in real time.
Event Types
sms.delivered— Fired when the carrier confirms the message was successfully delivered to the recipient’s handset.sms.failed— Fired when delivery fails after all carrier-level retries are exhausted. The payload includes anerror_codeanderror_messageto help you diagnose the cause.sms.sent— Fired when the message leaves Hany’s gateway and is handed off to the carrier network. At this point, delivery is not yet confirmed.
Payload Examples
The examples below show the payload shapes for each event type. Successful delivery (sms.delivered)
sms.sent)
Payload Fields
The type of webhook event. One of
sms.delivered, sms.failed, or sms.sent.The unique identifier of the SMS message. Use this to correlate the webhook event with the original send request.
The batch ID if the message was sent via the bulk send endpoint.
null for single sends.The recipient’s phone number in E.164 format.
The sender ID used when the message was sent — either a phone number or an alphanumeric brand name.
The delivery status of the message. One of
delivered, failed, or sent.ISO 8601 timestamp indicating when the carrier confirmed delivery.
null if the message has not been delivered (for example, on sms.sent or sms.failed events).ISO 8601 timestamp indicating when the message was dispatched from Hany’s gateway to the carrier.
ISO 8601 timestamp indicating when this webhook event was generated and fired by Hany.
Failure Payload Example
When delivery fails, Hany includes additionalerror_code and error_message fields to help you understand and respond to the failure:
A machine-readable code describing the reason for failure (for example,
unreachable_subscriber). Present only on sms.failed events.A human-readable description of the failure reason. Present only on
sms.failed events.Handling the Webhook in Your Server
The example below shows a minimal Node.js Express handler that receives delivery status events and acknowledges them correctly:server.js
The
batch_id field lets you correlate individual delivery events back to a bulk campaign. When you send messages via the bulk endpoint, every resulting webhook event for that campaign will carry the same batch_id, making it easy to track per-recipient outcomes at scale.