Skip to main content

Query MMS Template

Invoke the QueryMMSTemplate API to retrieve details of MMS templates.

Request Parameters

Parameter nameTypeDescriptionRequired
ActionstringValue: QueryMMSTemplate.Yes
AccountIdintProject ID, Get AccountId.Yes
TemplateIds[]stringList of template IDs to be queried.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
MessagestringWhen RetCode is not 0, the specific error description is displayed in Message.Yes
Data[]OutTemplateList of detailed information about MMS templates. See OutTemplate for detailed field descriptions.No

OutTemplate

Parameter nameTypeDescriptionRequired
TemplateIdstringMMS template ID.Yes
TemplateNamestringMMS template name.Yes
MediaFilestringMedia file address, Base64 encoded, valid for 3 seconds.Yes
MediaTypestringMedia file type.Yes
TextstringMMS template text content.Yes
SubjectstringMMS title.Yes
StatusintMMS template status. Status descriptions: 0-Pending review, 1-Under review, 2-Approved, 3-Not approved, 4-Disabled.Yes
ErrDescstringReason for disapproval during review.Yes
CreateTimeintCreation time, timestamp format.Yes
AttributesstringExplanation of template variable properties.No

Request Example

curl --request POST 'https://api.uspeedo.com/api' \
--header 'Content-Type: application/json' \
-d '{
"Action": "QueryMMSTemplate",
"AccountId": 1,
"TemplateIds": ["TemplateId1"]
}'

Response Example

{
"Action": "QueryMMSTemplateResponse",
"Message": "",
"RetCode": 0,
"Data": [
{
"TemplateId": "TemplateId1",
"TemplateName": "mms template name",
"MediaFile": "bW1zIG1lZGlhIGRhdGE=",
"MediaType": "image/png",
"Text": "mms template text",
"Subject": "mms subject",
"Status": 2,
"ErrDesc": "",
"CreateTime": 1672502400,
"Attributes": []
}
]
}