API 接入

短信 API、批量发送与 SMPP 网关接入

从一个 HTTP 请求开始发送短信,或通过 SMPP 网关接入高吞吐链路。本页集中提供接口地址、请求字段、返回示例、状态码和网关配置,方便开发者直接评估接入工作量。

POST http://159.138.31.6/sms/send
Content-Type: application/json

{
  "account": "String",
  "password": "String",
  "mobile": "60123456789",
  "msg": "[ZHLY] 您的验证码是123456"
}

API 文档

接入文档与配置说明

REST API 适合业务系统快速上线,SMPP 适合持续高并发发送。根据发送量、回执要求和系统架构选择接入方式。

发送短信

用于提交单个号码的短信任务,适合验证码、订单提醒和系统通知等实时发送场景。

调用方式
POST
请求地址
http://159.138.31.6/sms/send
请求头
Content-Type: application/json
{
  "account": "String",
  "password": "String",
  "msg": "String",
  "mobile": "String",
  "uid": "String",
  "senderId": "String",
  "url": "String"
}

发送批量短信

用于一次提交多个号码,适合营销活动、批量通知和会员运营等集中发送任务。

调用方式
POST
请求地址
http://159.138.31.6/sms/sendBatch
请求头
Content-Type: application/json
{
  "msg": "success",
  "item": {
    "msgid": "210519193052735868041, 210519193052735868042, ......",
    "uid": "xxxxx"
  },
  "code": 10001,
  "success": true
}

请求参数说明

以下字段用于身份认证、目标号码、消息内容、发送序列号和回调地址配置。

参数 类型 必填 说明
accountString是账号
passwordString是密码
mobileString是发送目标号码,单个号码或多个号码,多个号码之间用英文逗号隔开,最大100个号码。
msgString是短信内容,限制500个字符,必须有签名。例如:[ZHLY]您的验证码是123456,2分钟内有效。
uidString是发送序列号
senderIdString否发送者标识,可选。
urlString否用户可设置回调地址,如果为空将使用接入账号配置的回调地址。

状态码

通过状态码判断请求是否成功,以及失败原因是账号、内容、号码、频率还是查询范围问题。

10001 Success 10002 System error 10003 Account does not exist 10004 Account disabled 10005 Password error 10006 Illegal ip 10007 Account length exceeded limit 20001 The message content cannot be blank 20002 The length of the message exceeds the limit 20003 The format of mobile number is wrong 20004 Sent times out of limit 20005 Daily delivery exceeds limit 20006 Sent out of limit 20007 Sent in excess of counter - complaint limit 20008 User batch number exceeds limit 20009 Batch send mobile number exceeds limit 30001 Gets the number of detail entries out of limit 30002 Get the number of pages out of limit 30003 Incorrect format for getting detail date 30004 Get detail date out of range

SMPP Configuration Settings

SMPP 接入参数用于建立网关长连接。用户名、密码、会话数和流量方向需联系销售确认。

SMPP VersionSMPP 3.4 / SMPP 5.0
Mode of ConnectionTransceiver
SMSGW IP Address159.138.31.6
Port2775 or 2875 with SSL
UsernameContact the sales
PasswordContact the sales
Number of SessionContact the sales
Message Rate10/s
Traffic DirectionContact the sales
TON/NPIton=1, npi=1
Delivery Report1

语音中继 / HLR号码查询 / 余额查询

这些能力将作为后续接口开放。当前如需相关能力,可先通过销售确认可用范围和接入计划。