Webhook
The status of the SMS package you have sent will be communicated to your server in JSON format using the POST method of the HTTP protocol. Follow the instructions below.
Request URL
The status of the SMS package will be sent to the URL you set under the Webhook tab in your İleti Merkezi panel, Settings -> API -> Webhook.
Request Body
Content of the request that will be POSTed to you in the webhook
{
"report": {
"id": "",
"packet_id": "",
"status": "",
"to": "",
"body": ""
}
}
Definitions
report
The requests sent to you are encapsulated with the report tag, and its sub-tags are as follows:
- id: Represents the id value of a single message within the order you sent.
- packet_id: Represents the id value of the order you sent.
- status: Represents the status of a single message within the order you sent. It can have the following values:
- accepted: Indicates that your SMS message has been accepted and is being prepared for delivery.
- delivered: Indicates that your SMS message has been successfully delivered.
- undelivered: Indicates that your SMS message could not be delivered.
- to: Represents the mobile phone number.
- body: Represents the SMS message text.
Example Request
{
"report": {
"id": 1599558518,
"packet_id": 104525848,
"status": "accepted",
"to": "+90505702xxxx",
"body": "Webhook test message"
}
}