Send SMS
开发中POST
/smsLast modified: 1 年前
Description
Version
1.0
Sign2.0
Notes
- The sending is asynchronous, and the request may fail
- A maximum of 100 SIMs are supported
- Each message contains a maximum of 140 characters
- The retention time of the SMS in SMS-Center varies from 24 hours to 7 days
- Not all SIMs can receive SMS via this API. For details, consult FAE
Attention
Sending may fail in below situations and the SMS will NOT be sent:
- SMS service is not enabled for the organisation (consult FAE)
- SIM IDs provided do not belong to the organisation
- SIM ID duplicates
- SMS sending via API is not supported for some SIMs
Idempotence
- If same nonce, same sim_ids and the same sms message is sent in 2 requests within 10s, they will be treated as the same request, and the same job id will be returned. The actual sending will only occur once.
When a request is timeout, you may use above method to retrieve the job id.
- Otherwise, it will be treated as a new request and the sms will be sent again.
Result
- Response of this API indicates the receipt of the request only. It does not indicate the status of sending of the SMS.
- To request the status of the sending:
请求参数
Body Params application/json
sim_ids
array[string]
required
max 100 ICCIDs
message
object
required
type
enum<integer>
required
1-text ;2-binary
Allowed values:
12
Default:
1
Example:
1
content
string
required
max 140 characters
Example
{
"sim_ids": [
"86794148283239966802",
"39440749342275537087",
"97779886758671560277",
"43788379266737389139",
"60892351884534010189"
],
"message": {
"type": 1,
"content": "elit laboris"
}
}
示例代码
Responses
Success(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
data
object
required
job_id
string
required
Example
Success
{
"data": {
"job_id": "898239829382732323"
},
"status": {
"code": "CB-00-0000",
"message": "Success",
"detail": []
}
}
Last modified: 1 年前