Skip to main content

Create MMS Template

Invoke the CreateMMSTemplate API to request an MMS template.

Request Parameters

Parameter nameTypeDescriptionRequired
ActionstringValue: CreateMMSTemplate.Yes
AccountIdintProject ID, Get AccountId.Yes
TemplateNamestringMMS template name, not exceeding 20 characters. Each English letter, symbol, number, Chinese character, etc., counts as 1 character.Yes
TextstringMMS template text content, not exceeding 5000 bytes. Format variables in the template as {N}, where N is an integer greater than 1. When there are multiple parameters, N starts from 1, such as {1}, {2}, etc.Yes
MediaTypestringMMS media file type, currently supports: "image/png", "image/jpeg".Yes
MediastringMMS media file data, base64 encoded, not exceeding 300KB.Yes
SubjectstringMMS title, not exceeding 20 characters.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
MessagestringWhen RetCode is not 0, the specific error description is displayed in Message.Yes
TemplateIdstringMMS template ID.Yes

Request Example

curl --request POST 'https://api.uspeedo.com/api' \
--header 'Content-Type: application/json' \
-d '{
"Action": "CreateMMSTemplate",
"AccountId": 1,
"TemplateName": "mms template name",
"Subject": "mms subject",
"Text": "mms text",
"MediaType": "image/png",
"Media": "bW1zIG1lZGlhIGRhdGE="
}'

Response Example

{
"Action": "CreateMMSTemplateResponse",
"Message": "",
"RetCode": 0,
"TemplateId": "TemplateId"
}