Skip to content

Webhooks

momi00 edited this page Jan 10, 2025 · 3 revisions
  • (DR) Callback to webhooks

We provide webhook callback to update the sending sms status.

URL:

  • The webhool url should be develop and provide by your side. And should using some mq system to avoid time cunsuming operation.
  • E.g. http://106.15.34.94:8989/sms/testDr

Http Method:

  • POST x-www-form-urlencoded
  • For customers registered before May 4, 2023, the parameters are in the URL; for customers registered after that, the parameters are in the post body.

Parameters:

Name Required Type Memo
phone Y string
status Y string 2 success, all other means fail
result Y string DELIVRD\ UNDELIV
drtime Y string DR time, in format yyyy-MM-dd HH:mm:ss
messageid Y string message id returned when commit the request
currency Y string currency, CNY\ USD
price Y string Sms price
rate Y string Currency rate to CNY, E.g. USD 7.05
sendtime Y string Sms send time, in format yyyy-MM-dd HH:mm:ss
size Y string charging sms size.
ext N string Only suport SMS sending using http API. Provide in the request, will returned in the callback

Example

For customers registered before May 24, 2023, parameters are passed in the URL

http://106.15.34.94:8080/sms/testDr?result=DELIVRD&size=1&phone=6282167624806&rate=6.4845&price=0.045&messageid=b308d94a73f94e6d84ae975c41f4b2a6&drtime=2021-02-26 10:01:15&currency=USD&sendtime=2021-02-26 10:01:15&status=2

For customers registered after May 24, 2023, parameters are passed in the post body

POST http://106.15.34.94:8080/sms/testDr
Content-Type: x-www-form-urlencoded

result=DELIVRD&size=1&phone=6282167624806&rate=6.4845&price=0.045&messageid=b308d94a73f94e6d84ae975c41f4b2a6&drtime=2021-02-26 10:01:15&currency=USD&sendtime=2021-02-26 10:01:15&status=2

DR status

public static final int DELIVRD = 2; 
public static final int UNDELIV = 5; 
public static final int REJECTD = 6; 
public static final int EXPIRED = 7; 
public static final int DELETED = 8; 
public static final int DND = 9; 
public static final int ESME_RINVSRCADR = 11;  // invalid sender
public static final int UNKNOWN = 12; 

Status text
success:success fail:error

Memo
All DR will be tried only once with our best, no guarantee 100% arrive. For re-callback, please contact the noc.

For sending sms to multile phone numbers in single API, messageid will add 10 digit random digits(20190909151515701-1234567890)

Introduction

WhatsApp

Short message

Voice

Call Center(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally