ModifySmsTemplate

Last updated: 2020-05-09 14:56:04

1. API Description

Domain name for API request: sms.tencentcloudapi.com.

This API is used to modify an SMS body template. Please read the Tencent Cloud SMS Body Template Review Standards before making a modification.

  • ⚠️ Note: individual users cannot use this API to modify SMS body templates. For more information, please see Identity Verification Overview. If your account identity is individual, you can log in to the console to modify SMS body templates.
  • Modifications can be made only if the body template status is pending review or rejected. Approved body templates cannot be modified.

A maximum of 1 requests can be initiated per second for this API.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: ModifySmsTemplate.
Version Yes String Common parameter. The value used for this API: 2019-07-11.
Region No String Common parameter. This parameter is not required for this API.
TemplateId Yes Integer ID of template to be modified.
TemplateName Yes String New template name.
TemplateContent Yes String New template content.
SmsType Yes Integer SMS type. 0: ordinary SMS, 1: marketing SMS.
International Yes Integer Whether it is Global SMS:
0: Mainland China SMS.
1: Global SMS.
Remark Yes String Template remarks, such as reason for application and use case.

3. Output Parameters

Parameter Name Type Description
ModifyTemplateStatus ModifyTemplateStatus Template parameter modification response
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Sample request

Input Example

https://sms.tencentcloudapi.com/?Action=ModifySmsTemplate
&TemplateId=1110
&TemplateName=Tencent Cloud
&TemplateContent="xxx"
&SmsType=test
&International=0
&Remark=“xxx”
&<common request parameters>

Output Example

{
  "Response": {
    "ModifyTemplateStatus": {
      "TemplateId": 1110
    },
    "RequestId": "f36e4f00-605e-49b1-ad0d-bfaba81c7325"
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.FailResolvePacket Failed to parse the request packet. Generally, this is because that the API specification was not followed. Please see Detailed Explanation of Request Body Parsing Error 1004.
FailedOperation.MissingTemplateToModify This template ID has not been submitted for approval or does not exist, so it cannot be modified. Please check whether the TemplateId is entered correctly.
FailedOperation.NotEnterpriseCertification Individual users cannot use the APIs related to signatures and templates.
FailedOperation.OtherError Other error. Generally, this is because that the carried parameter is non-compliant. For more information, please see the API description. If necessary, please contact SMS Helper for assistance.
FailedOperation.TemplateAlreadyPassedCheck This template has been approved and cannot be modified again.
InternalError.OtherError Other error. Please contact SMS Helper and provide the failed mobile number for assistance.
InternalError.RequestTimeException The request was initiated in an exceptional time. Generally, this is because that the difference between your server time and Tencent Cloud server time exceeds 10 minutes. Please check whether the server time and the time field in the API are correct.
InternalError.RestApiInterfaceNotExist This RESTful API does not exist. Please check the RESTful API description.
InternalError.SigVerificationFail Sig check on backend failed.
InternalError.UnknownError Unknown error.
InvalidParameter.InvalidParameters Incorrect International or SmsType parameter. If necessary, please contact SMS Helper for assistance.
InvalidParameterValue.InvalidInternational International field check failed. Please see the description of this field in the API description. If necessary, please contact SMS Helper for assistance.
UnauthorizedOperation.RequestIpNotInWhitelist The requesting IP is not in the whitelist. You have configured verification of request source IP, but the current requesting IP is not in the configured whitelist. If necessary, please contact SMS Helper for assistance.
UnauthorizedOperation.RequestPermissionDeny You do not have permission to make the request. Please contact SMS Helper for assistance.
UnauthorizedOperation.SdkAppidIsDisabled This sdkappid is forbidden to provide services. If necessary, please contact SMS Helper for assistance.
UnauthorizedOperation.SerivceSuspendDueToArrears The service has been suspended due to arrears. You can log in to Tencent Cloud to top up your account.
UnsupportedOperation. This request is not supported.