Send Batch SMS
API Description
Send SMS messages in batch. Supports sending to multiple phone numbers at once.
Request Information
- Get API Key:
ACCESSKEY_ID:ACCESSKEY_SECRET - Request Method:
POST - Request Path:
/api/v1/usms/SendBatchUSMSMessage - Content-Type:
application/json
Body Parameters
| Parameter Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
| TaskContent | array | Yes | Send task list | See description below |
TaskContent Array Element Description
Each element contains the following fields:
| Parameter Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
| TemplateId | string | Yes | Template ID | "template_id_1" |
| SenderId | string | Yes | Sender identifier (sender name) | "uSpeedo" |
| Target | array | Yes | Target phone number list | See description below |
Target Array Element Description
Each element contains the following fields:
| Parameter Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
| Phone | string | Yes | Phone number | "13800138000" |
| TemplateParams | array | No | Template parameters (according to template variables) | ["123456"] |
TaskContentstringrequired
Send task list as JSON string. Real API expects the full JSON structure described below.
?
LANGUAGE
CREDENTIALS
👁️
🔒
🔑Log in to get ACCESSKEY_ID and ACCESSKEY_SECRET
URL
POST
CURL Request▼
curl -X POST "https://api.uspeedo.com/api/v1/usms/SendBatchUSMSMessage" \-H "Content-Type: application/json" \-H "Accept: application/json" \-H "Authorization: Basic $(echo -n 'ACCESSKEY_ID:ACCESSKEY_SECRET' | base64)" \-d '{"TaskContent": [{"TemplateId": "template_id_1","SenderId": "uSpeedo","Target": [{"Phone": "13800138000","TemplateParams": ["123456"]}]}]}'
RESPONSE
Click Try It! to start a request and see the response here.
Response Format
Success Response
{
"RetCode": 0,
"Message": "success",
"SessionNo": ["session_no_1", "session_no_2"],
"FailedTargetPhones": []
}
Response Field Description
| Field Name | Type | Description |
|---|---|---|
| RetCode | int | Return code, 0 indicates success |
| Message | string | Return message |
| SessionNo | array | Session number list, used for querying send status |
| FailedTargetPhones | array | List of failed phone numbers, each element contains: Phone, TemplateParams, FailureReason |
Error Response
{
"RetCode": 215392,
"Message": "Invalid parameter [TemplateId]"
}
Common Error Codes
| Error Code | Description |
|---|---|
| 0 | Success |
| 215392 | Parameter error |
| 215397 | Missing required parameter |
| 215400 | Server error |