Chuyển tới nội dung chính

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:

ParameterMeaningData Type
typeCampaign status:
• approved - Approved
• reject - Rejected
String
campaign_codeCampaign codeString
noteNote (if any)String / Null
  • Campaign detail parameters:
ParameterMeaningData Type
typeresult indicates campaign resultString
campaign_codeCampaign codeString
linkURL to CSV file with campaign detailsString
  • CSV file structure:
ParameterMeaningData Type
phonePhone numberString
telcoCarrierString
msgMessage contentString
msg_countNumber of messagesString
statusStatusString
error_descError descriptionString / Null

CURL Example:

curl -X GET https://your-domain.com/webhook?type=reject&campaign_code=fbfacf73-2628-43b7-a9a4-c7ce149eb316&note=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_CODE 200 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 after 10s, and the remaining retries every 300s.
  • The webhook response time must be less than 2s. If it exceeds 2s, it will be considered a failure.