Create MMS Template
Invoke the CreateMMSTemplate API to request an MMS template.
Request Parameters
Parameter name | Type | Description | Required |
---|---|---|---|
Action | string | Value: CreateMMSTemplate. | Yes |
AccountId | int | Project ID, Get AccountId. | Yes |
TemplateName | string | MMS template name, not exceeding 20 characters. Each English letter, symbol, number, Chinese character, etc., counts as 1 character. | Yes |
Text | string | MMS 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 |
MediaType | string | MMS media file type, currently supports: "image/png", "image/jpeg". | Yes |
Media | string | MMS media file data, base64 encoded, not exceeding 300KB. | Yes |
Subject | string | MMS title, not exceeding 20 characters. | No |
Response Elements
Parameter name | Type | Description | Required |
---|---|---|---|
RetCode | int | When RetCode is not 0, the specific error description is displayed in Message. If RetCode is 0, Message will not be returned. | Yes |
Action | string | Operation name. | Yes |
Message | string | When RetCode is not 0, the specific error description is displayed in Message. | Yes |
TemplateId | string | MMS 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"
}