API开发文档
欢迎浏览我们的API开发文档!
获取短信列表
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"}]
}