分类

获取短信列表

GET

/api/sms/:date

权限:短信

Header
字段类型描述
Content-Type字符串应用或JSON
参数
字段类型描述
date字符串日期格式为“YYYY-MM-DD”或“YYYY-MM”
请求样例
/api/sms/2017-10
成功 200
字段类型描述
totalRows数值符合筛选日期的短信总数量
rows对象数组短信列表
messageId字符串短信的唯一编号
time字符串短信发送时间
from字符串发送方电话号码
to字符串接收方电话号码
text字符串短信或彩信的文本内容
media字符串数组彩信中多媒体(多数为图片)URL地址的数组
direction字符串短信发送方向,值为以下其中之一:[‘inbound’, ‘outbound’]
charge字符串短信费用
state字符串短信状态
成功响应
HTTP/1.1 200 OK
 {
     "totalRows": 3,
     "rows": [{"messageId": "SMS_SM905869894f9745e1b9fe6468789deec8", "time": "2017-10-31T21:59:22.375Z", "from": "16473451234", "to": "14168901234", "text": "Hello", "direction": "outbound", "charge": 0.015, "state": "delivered"},
             {"messageId": "SMS_SMca92be6c44214c1aaebde43eb6b2f164", "time": "2017-10-31T21:58:50.735Z", "from": "16473451234", "to": "14168901234", "text": "erh", "direction": "outbound", "charge": 0.015, "state": "delivered"},
             {"messageId": "SMS_MM50f9b7b8e4ec0723480d97e1d3bb1949", "time": "2017-10-31T21:43:19.239Z", "from": "14168901234", "to": "16473451234", "text": "", "media": ["http://example.com/abd.png"], "direction": "inbound", "charge": 0.02, "state": "received"}]
 }

标签:
上一页 接收短信
下一页 发送短信