This API operation is unpublished.
This API has been deprecated. We recommend migrating to Dysmsapi(2017-05-25) - UpdateSmsTemplate for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Operation description
-
Alibaba Cloud has updated its template-related API operations to comply with regulations from the Ministry of Industry and Information Technology (MIIT) and requirements from carriers. To improve the efficiency and success rate of template reviews, use the new UpdateSmsTemplate - Modify an SMS template API operation.
-
You can modify only templates that have failed review. For more information, see Suggestions for handling failed SMS template reviews. After you modify a template by calling this API operation, submit it for review again.
-
When you modify templates using this API operation, the modifications are synchronized to the Short Message Service console. For more information about template operations in the console, see SMS templates.
QPS limits
The queries per second (QPS) limit for a single user is 1,000. If you exceed this limit, API calls are throttled, which can affect your business. Call this operation a reasonable number of times.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dysms:ModifySmsTemplate |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateType |
integer |
Yes |
The type of the text message. Valid values:
|
1 |
| TemplateName |
string |
Yes |
The name of the template. The name must be 1 to 30 characters in length. |
aliyun verification code |
| TemplateCode |
string |
Yes |
The code of the SMS template that failed review.
|
SMS_15255**** |
| TemplateContent |
string |
Yes |
The content of the template. The content can be up to 500 characters in length. The template content and variables must comply with the SMS template specifications. Otherwise, the template fails the review. You can also view common sample templates on the Apply for Template page. Using sample templates can improve the efficiency and success rate of reviews. For more information about variable specifications, see Variable specifications for the TemplateContent parameter. |
You are applying for mobile registration. The verification code is: ${code}, valid for 5 minutes! |
| Remark |
string |
Yes |
The description for the SMS template application. The description can be up to 100 characters in length. This information is used for template review. A detailed description helps reviewers understand your business scenario and improves review efficiency. Follow these guidelines:
|
Modify the parameters of the template. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The request status code.
|
OK |
| Message |
string |
The description of the status code. |
OK |
| RequestId |
string |
The request ID. |
F655A8D5-B967-440B-8683-DAD6FF8DE990 |
| TemplateCode |
string |
The code of the modified template. |
SMS_15255**** |
Examples
Success response
JSON format
{
"Code": "OK",
"Message": "OK",
"RequestId": "F655A8D5-B967-440B-8683-DAD6FF8DE990",
"TemplateCode": "SMS_15255****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | TemplateParameterCountIllegal | The verification code template only supports 1 verification code as a variable | Verification code templates support only one variable, which must be a verification code. |
See for a complete list.
Release notes
See Release Notes for a complete list.