Creates a card SMS template.
Operation description
-
The card SMS feature is currently available by invitation only. To enable this feature, contact your Alibaba Cloud business manager or our pre-sales consultation team.
-
This operation saves a card SMS template, submits it to mobile phone vendors for review, and returns a template code.
-
If a card SMS template contains a type or event that a vendor does not support, the system does not submit the template to that vendor for review. For more information, see Supported template types by vendor.
-
For more examples of card SMS templates, see Card SMS template examples.
QPS limit
The QPS limit for a single user is 300. API calls that exceed this limit are throttled, which may impact your business. Plan your calls accordingly.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dysms:CreateCardSmsTemplate |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateName |
string |
Yes |
The name of the card SMS template. |
阿里云图文类模板 |
| Template |
object |
Yes |
The content of the card SMS template. Note
|
{ "extendInfo":{ "scene":"HMOVM图文", "purpose":"2", "userExt":{ "outId":"1234554321" } }, "templateContent":{ "pages":[ { "tmpCards":[ { "type":"IMAGE", "srcType":1, "src":"28755", "actionType":"OPEN_APP", "action":{ "target":"https://s.tb.cn/c.KxzZ", "merchantName":"测试-图文模板", "packageName":[ "com.taobao.taobao"], "floorUrl":"https://s.tb.cn/c.KxzZ" }, "positionNumber":1 }, { "type":"TEXT", "content":"测试- BENZ AMG 2020 试驾邀请", "isTextTitle":true, "positionNumber":2 }, { "type":"TEXT", "content":"测试-梅赛德斯-奔驰,创新激情永不灭。作为汽车 XXXX", "isTextTitle":false, "positionNumber":3 }, { "type":"BUTTON", "content":"预约试驾", "actionType":"OPEN_BROWSER", "action":{ "target":"https://www.mercedes-benz.com.cn", "merchantName":"测试-正在跳转梅赛德斯-奔驰" }, "positionNumber":4 }] }] }, "cardSignName":"阿里云", "cardType":5, "companyName": "投放企业名称" } |
| Memo |
string |
No |
A description of the template. |
图文类模板 |
| Factorys |
string |
No |
The vendors to which the template will be submitted. Valid values:
Note
If you do not specify this parameter, the system automatically submits the template to all supported mobile phone vendors. |
["HuaWei","XiaoMi"] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data object. |
||
| Code |
string |
The request status code. Valid values:
|
OK |
| RequestId |
string |
The request ID. |
F655A8D5-B967-440B-8683-DAD6FF8DE990 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Data |
object |
The data returned by the operation. |
|
| TemplateCode |
string |
The code for the card SMS template. You can view the Template Code on the Card SMS > template management page in the console. Note
The card SMS template must be approved before it can be used. |
CARD_SMS_2**** |
Examples
Success response
JSON format
{
"Code": "OK",
"RequestId": "F655A8D5-B967-440B-8683-DAD6FF8DE990",
"Success": true,
"Data": {
"TemplateCode": "CARD_SMS_2****"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 200 | ForbiddenAction | Access to the account is denied. Please contact the administrator. | No access, please contact administrator. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.