Modifying an SMS Template
Function
This API is used to modify template information. Currently, only rejected SMS templates can be modified.
URI
PUT /v2/{project_id}/msgsms/templates/{id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
Primary key ID of the template, which is the value of id in Table 5. |
project_id |
Yes |
String |
Project ID. For details, see Obtaining Account, User, and Project Information. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Request body parameter type. This parameter must be set to application/json. |
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app_id |
Yes |
String |
Primary key ID of the application. For details, see id in Table 5. |
brackets |
No |
String |
Bracket type. Enumerated values:
|
region |
Yes |
String |
Region.
|
send_country |
No |
Array of integers |
List of IDs of countries or regions to which SMSs are sent. Obtain this parameter from Table 4. This parameter is valid when region is set to eu. |
template_content |
Yes |
String |
Template content. |
template_desc |
No |
String |
Template description. |
template_name |
Yes |
String |
Template name. |
template_type |
Yes |
String |
Template type. Enumerated values:
|
universal_template |
No |
Integer |
Whether the template is a general template.
|
Response Parameters
Status code: 200
Parameter |
Description |
---|---|
id |
Primary key ID of the template. |
template_name |
Template name. |
Request Example
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": "intl", "sign_id": "******58-e866-4b30-9ca5-a476a00e8775", "template_content": "Test", "template_name": "auto_test000", "template_type": "NOTIFY_TYPE", "universal_template": 0 }
Response Example
{ "id": "******aa-4e87-4a70-b84d-a2d685599072", "template_name": "auto_test000" }
Returned Values
Status Code |
Description |
---|---|
200 |
OK |
201 |
Created |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
System error |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.