Send Batch MMS Message
Invoke the SendBatchMMSMessage API to send MMS messages in bulk.
Each batch request supports a maximum of 1000 phone numbers.
Request Parameters
Parameter name | Type | Description | Required |
---|---|---|---|
Action | string | Value: SendBatchMMSMessage. | Yes |
AccountId | int | Project ID, Get AccountId. | Yes |
TaskContent | []SendInfo | Bulk sending content. See SendInfo for detailed field descriptions. | Yes |
SendInfo
Parameter name | Type | Description | Required |
---|---|---|---|
TemplateId | string | MMS template ID. | Yes |
SenderId | string | Sender ID. | No |
Target | []TargetPhone | Information of phone numbers to be sent. See TargetPhone for detailed field descriptions. | Yes |
TargetPhone
Parameter name | Type | Description | Required |
---|---|---|---|
Phone | string | Phone number. | Yes |
TemplateParams | []string | Actual template parameters for sending (not required if using a parameter-less template). | 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 |
SessionNo | string | Unique ID of the submission task for this session, which can be used to query the list of SMS sent in this session. This field is returned only when the number of successful submissions is greater than 0. | No |
SuccessCount | int | Number of MMS messages successfully submitted. | No |
FailContent | []SendInfoWithFailure | Detailed information of phone numbers that were not successfully submitted. See SendInfoWithFailure for detailed field descriptions. | No |
SendInfoWithFailure
Parameter name | Type | Description | Required |
---|---|---|---|
TemplateId | string | MMS template ID. | Yes |
SenderId | string | Sender ID. | No |
Target | []TargetPhoneWithFailure | Information of phone numbers that failed to submit. See TargetPhoneWithFailure for detailed field descriptions. | Yes |
FailureDetails | string | Reason for submission failure. | No |
TargetPhoneWithFailure
Parameter name | Type | Description | Required |
---|---|---|---|
TemplateParams | []string | Template parameters. | No |
Phone | string | Phone number. | Yes |
FailureDetails | string | Reason for phone number submission failure. | Yes |
Request Example
curl --request POST 'https://api.uspeedo.com/api' \
--header 'Content-Type: application/json' \
-d '{
"Action": "SendBatchMMSMessage",
"AccountId": 1,
"TaskContent": [
{
"Target": [
{
"TemplateParams": [
"param1"
],
"Phone": "(1)1111111"
}
],
"SenderId": "sender id",
"TemplateId": "template id"
}
]
}'
Response Example
{
"Action": "SendBatchMMSMessageResponse",
"Message": "",
"RetCode": 18046,
"FailContent": [
{
"FailureDetails": "failure details",
"SenderId": "sender id",
"Target": [
{
"FailureDetails": "phone failure details",
"Invalid": true,
"Phone": "(1)1111111",
"TemplateParams": [
"param1"
]
}
],
"TemplateId": "template id"
}
],
"SessionNo": "session no",
"SuccessCount": 1
}