This operation sends messages to different phone numbers using a single template, with different signatures and template variables for each recipient.
Operation description
Basic information
You can send messages to a maximum of 100 phone numbers in a single call.
The global endpoint is
dysmsapi.aliyuncs.com. For a list of region-specific endpoints, see Endpoints.
API calls
We recommend calling this operation using an SDK. For more information, see Make your first API call.
To send messages from the console, see Send group messages.
To build your own API requests, see V3 request body and signature mechanism.
Usage notes
For domestic SMS, we recommend setting the timeout period to 1 second or longer. If a timeout occurs, check the delivery receipt status before you retry the request. For more information about timeout and retry settings, see timeout mechanism and retry mechanism.
This operation does not support idempotence for domestic SMS, international SMS, or Multimedia Messaging Service (MMS) messages. You must implement your own idempotence controls to prevent duplicate operations caused by multiple retries.
- This is a billable operation. For domestic SMS, you are charged based on the delivery receipt status from the carrier. You are not charged for messages that are successfully submitted but fail carrier delivery. For more information, see Billing overview.
Warning Batch message delivery may be delayed due to system capacity limits. For time-sensitive messages, such as verification codes or alert notifications, use the SendSms operation to send messages individually.
QPS limit
The Queries Per Second (QPS) limit for a single user is 5,000. Calls that exceed this limit are throttled. Plan your usage accordingly.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dysms:SendBatchSms |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PhoneNumberJson |
string |
Yes |
The recipient phone numbers. Format:
Note
For time-sensitive messages like verification codes, use the SendSms operation to send messages individually. |
["1590000****","1350000****"] |
| SignNameJson |
string |
Yes |
The signature names. The number of signatures must match the number of phone numbers. You can call the QuerySmsSignList operation or check the Short Message Service console to find approved signatures. You must use an approved signature. Note
|
["阿里云","阿里巴巴"] |
| TemplateCode |
string |
Yes |
The message template code. You cannot use templates for domestic SMS and international SMS interchangeably. You can call the QuerySmsTemplateList operation or check the Short Message Service console to find approved template codes. You must use an approved template code. |
SMS_15255**** |
| TemplateParamJson |
string |
No |
The actual values for the template variables. This parameter is required if the template contains variables. Note
|
[{"name":"TemplateParamJson"},{"name":"TemplateParamJson"}] |
| SmsUpExtendCodeJson |
string |
No |
A JSON array of MO SMS extension codes. Note
You can leave this parameter empty if you have no special requirements. |
["90999","90998"] |
| OutId |
string |
No |
An external business ID. It must be a string of fewer than 256 characters. Note
You can leave this parameter empty if you have no special requirements. |
abcdefg |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The request status code.
|
OK |
| Message |
string |
The description of the request status. |
OK |
| BizId |
string |
The delivery receipt ID.
|
9006197469364984400 |
| RequestId |
string |
The request ID. |
F655A8D5-B967-440B-8683-DAD6FF8D230E |
Examples
Success response
JSON format
{
"Code": "OK",
"Message": "OK",
"BizId": "9006197469364984400",
"RequestId": "F655A8D5-B967-440B-8683-DAD6FF8D230E"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.