Test Webhooks
What are webhooks
Webhooks are user-defined HTTP callback that notifies you about any action that has taken place.
Ant uses webhooks to push real-time notifications to your applications. By configuring webhooks, you can receive event notifications and use these notifications to execute actions in your backend systems.
Steps to receive webhooks
You can start receiving event notifications in your applications using the steps in this section:
Create a webhook endpoint.
Send your URL to your customer service
Handle requests from ANT by parsing each event and returning
2xx
response status codes.
Step 1: Create a webhook endpoint
You can build your webhook with code. Here is an example of Java code:
Step 2: Send your URL to ANT
https://your-server/ant-sms-deliver
Step 3: Handle requests from ANT
Check event objects
Each event is structured as an event object with common properties: smsId
,destination
,sendTime
, sendResult
and smsCount
Return a 2xx response
Your endpoint must quickly return a successful HTTP status (e.g., 200
) before any complex logic that could cause a timeout.
Last updated