Skip to main content

QueryUSMSTemplate

Call the QueryUSMSTemplate interface to query SMS templates.

Request Parameters

Parameter nameTypeDescriptionRequired
ActionstringValue: "QueryUSMSTemplate".Yes
AccountIdintProject ID: Get AccountId.Yes
TemplateId[]stringTemplate ID.Yes

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
DataobjectSMS template details information, see OutTemplate for detailed field descriptions.No

OutTemplate

Parameter nameTypeDescriptionRequired
TemplateIdstringSMS template ID.Yes
PurposeintTemplate type, options: 1-verification and authentication SMS template; 2-notification SMS template; 3-promotion SMS template.Yes
TemplateNamestringSMS template name.Yes
TemplatestringSMS template content.Yes
StatusintSMS template status; status description: 0-pending review, 1-under review, 2-approved, 3-failed review, 4-disabled.Yes
RemarkstringTemplate description.Yes
ErrDescstringReason for review failure.Yes
CreateTimeintCreation time.Yes
InstructionstringExplanation of template variable attributes.No

Request Example

curl -X POST https://api.uspeedo.com/api -H 'Content-Type: application/json' -d '{
"Action": "QueryUSMSTemplate",
"AccountId": "1",
"TemplateId": ["UTA190715D9108C"]
}'

Response Example

{
"Action": "QueryUSMSTemplateResponse",
"Message": "",
"Data": {
"Status": 2,
"TemplateName": "Verification code template 01",
"Template": "Your verification code is {1}. Please use it within {2} minutes. Do not disclose it to others.",
"TemplateId": "UTA190715D9108C",
"ErrDesc": "",
"CreateTime": 1566783067
},
"RetCode": 0
}