Campaign Status Webhook
Instructions for building a webhook to receive campaign status updates.
🌐 Webhook URL
You need to provide us with your Webhook URL to receive campaign status notifications.
Example URL:
https://your-domain.com/webhook
📦 Data Structure Sent to Webhook
-
HTTP Method:
GET -
Timeout: 2 seconds
-
Campaign status parameters:
| Parameter | Meaning | Data Type |
|---|---|---|
type | Campaign status: • approved - Approved • reject - Rejected | String |
campaign_code | Campaign code | String |
note | Note (if any) | String / Null |
- Campaign detail parameters:
| Parameter | Meaning | Data Type |
|---|---|---|
type | result indicates campaign result | String |
campaign_code | Campaign code | String |
link | URL to CSV file with campaign details | String |
- CSV file structure:
| Parameter | Meaning | Data Type |
|---|---|---|
phone | Phone number | String |
telco | Carrier | String |
msg | Message content | String |
msg_count | Number of messages | String |
status | Status | String |
error_desc | Error description | String / Null |
CURL Example:
curl -X GET https://your-domain.com/webhook?type=reject&campaign_code=fbfacf73-2628-43b7-a9a4-c7ce149eb316¬e=invalid%20content
curl -X GET https://your-domain.com/webhook?type=reject&campaign_code=fbfacf73-2628-43b7-a9a4-c7ce149eb316&url=https://static.yoursales.vn/report/fbfacf73-2628-43b7-a9a4-c7ce149eb316.csv
✅ Response
- HTTP Code:
200 OK - Webhook returns
HTTP_CODE200 for success - Error code list: Here
🛡️ Webhook Security
- IP Authentication: Only accept whitelisted IPs from our system.
📌 Notes
- If the webhook call fails, we will retry 5 times: the first retry after
5s, the second after10s, and the remaining retries every300s. - The webhook response time must be less than
2s. If it exceeds2s, it will be considered a failure.