Skip to main content

CreateUSMSTemplate

This is a process of calling the CreateUSMSTemplate interface to apply for an SMS template. Here are detailed descriptions of the request parameters and response elements

Request Parameters

Parameter nameTypeDescriptionRequired
ActionstringValue: CreateUSMSTemplate.Yes
AccountIdintProject ID, Get AccountId.Yes
PurposeintSMS template usage type: 1-verification and authentication SMS template; 2-notification SMS template; 3-promotion SMS template.Yes
TemplateNamestringSMS template name, no more than 32 characters, each English letter, symbol, number, Chinese character, etc. counts as 1 word.Yes
TemplatestringSMS template content, as follows: The number of words does not exceed 500, and each English letter, symbol, Chinese character, array, etc. counts as one word; the variable format in the template is filled in as {N}, where N is an integer greater than 1. When there are multiple parameters, it is recommended to start sequentially from 1, such as {1}, {2}, etc.; SMS templates are prohibited from including only variables.Yes
RemarkstringExplanation of the reason for applying for the SMS template, the number of words does not exceed 128, each English letter, symbol, number, Chinese character, etc. counts as 1 word.No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeintWhen RetCode is not 0, the specific error description is displayed in Message. If RetCode is 0, Message will not be returned.Yes
ActionstringOperation name.Yes
MessagestringReturn status code description. If the operation is successful, it will be returned as empty by default.Yes
TemplateIdstringSMS template ID (work order ID when applying for an SMS template).Yes

Request Example

curl -X POST https://api.uspeedo.com/api -H 'Content-Type: application/json' -d '{
"Action": "CreateUSMSTemplate",
"AccountId": 1,
"Purpose": 1,
"TemplateName": "vnSDFAjK",
"Template": "ulaAspXU",
"Remark": "eGfxoirr",
}'

Response Example

{
"Action": "CreateUSMSTemplateResponse",
"Message": "iUdpztgk",
"RetCode": 0,
"TemplateId": "edcONjeS"
}