forked from nxtele/http-api-document
-
Notifications
You must be signed in to change notification settings - Fork 1
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¤cy=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¤cy=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
- Send Message
- Mark Incoming Message as Read
- Upload Media File
- Get Media File
- Delete Media File
- Webhook
- Query Number Information
- Query Message Template
- Create Message Template
- Edit Message Template
- Delete Message Template
- Upload Template Example File
- Embedded Page Login
- Create Client Application
- List of Phone Numbers for Client Application
- Get Verification Code
- Verify Verification Code
- Create Local Client
Short message
Voice
Call Center(NXLink)
- Web Iframe
- Manual Dial Record
- Manual Dial Record Query By orderId
- List Agent Information
- List Agent Status
- List Queue
- List Agents In Queue
- List Agent Efficiency
- Update Queue Agents
- Create AutoDial Task
- Webhook - Manual Dial
Call Center(Callbot)
- Callbot API Summary
- Callbot API Authorization
- Callbot API Ping
- Create Auto Dial Task
- Add Contact List To Task
- Create Task And Add Contact
- Start Or Pause Task
- Update Task Parameters
- Get List Task
- List Call
- List Task Orders
- Stop Order
- Get Call Detail By Order
- Webhook - By Call
- Webhook - By Order
- Webhook - Task Status
Flash Call
Short links
邮件验证码
DID号码
通用
号码检测