修改短信模板
功能介绍
该接口用于用户修改模板信息,目前支持审核不通过的短信模板重新修改、支持审核通过的模板停用后重新修改、支持待审核或待签名审核的模板撤回模板申请后重新修改。
URI
PUT /v2/{project_id}/msgsms/templates/{id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
id |
是 |
String |
模板主键ID,对应表5中的ID |
|
project_id |
是 |
String |
项目ID,参考“获取账号、用户、项目的名称和ID” |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
Content-Type |
是 |
String |
请求体参数类型,该字段必须设置为:application/json |
|
X-Auth-Token |
是 |
String |
用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
app_id |
是 |
String |
应用主键ID,参考表5 响应SmsAppQueryResp参数中的ID |
|
brackets |
否 |
String |
中括号类型。支持枚举值:
|
|
region |
是 |
String |
地域
|
|
send_country |
否 |
Array of integers |
发送国家id列表,可以通过表4 响应SmsCountryResp参数获取。只有地域为全球时,该字段有效 |
|
sign_id |
否 |
String |
签名ID,对应表5 响应SmsSignatureResp参数中的ID。只有地域为中国大陆时,该字段有效 |
|
template_content |
是 |
String |
模板内容 |
|
template_desc |
否 |
String |
模板描述 |
|
template_name |
是 |
String |
模板名称 |
|
template_type |
否 |
String |
模板类型。支持枚举值: |
|
universal_template |
否 |
Integer |
是否为通用模板
|
|
flow_status |
否 |
String |
流程状态
|
响应参数
状态码: 200
|
参数 |
描述 |
|---|---|
|
id |
模板主键ID |
|
template_name |
模板名称 |
请求示例
PUT /v2/845ada5bc7444f1295cd517af0123da1/msgsms/templates/c3f641aa-4e87-4a70-b84d-a2d685599072 HTTP/1.1
Host: 100.85.***.***:30300
Content-Type: application/json
X-Auth-Token: ***
Content-Length: 311
{
"app_id": "******9c-1a6b-4ee5-9651-5bca450694b3",
"brackets": "GB",
"region": "cn",
"sign_id": "******58-e866-4b30-9ca5-a476a00e8775",
"template_content": "测试",
"template_name": "auto_test000",
"template_type": "NOTIFY_TYPE",
"universal_template": 0
}
响应示例
{
"id": "******aa-4e87-4a70-b84d-a2d685599072",
"template_name": "auto_test000"
}
返回值
|
返回值 |
描述 |
|---|---|
|
200 |
OK |
|
201 |
Created |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
500 |
System error |