Skip to main content

Batch MMS API

This document introduces how to use the PaaSoo Batch MMS API to send MMS messages to 1 - 5000 numbers simultaneously in a single request. If you need to enable the MMS feature or have MMS requirements for other regions, please contact your account manager promptly, or send your requirements to support@paasoo.com.

1. Invocation Method

Invocation Method
  • HTTP Method: POST
  • Content-Type: application/x-www-form-urlencoded
  • API Endpoint: https://api.paasoo.com/batch_mms
  • Request Parameter Encoding: Please URL-encode special characters.
  • Security: It is recommended to use the HTTPS protocol, and include the correct key and secret.
  • Batch Sending Limit: You can send 1 - 5000 MMS messages per request.

2. Request Example

The following is an example using cURL to demonstrate how to call the API via POST + application/x-www-form-urlencoded:

cURL
curl -X POST "https://api.paasoo.com/batch_mms" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=API_KEY&secret=API_SECRET&from=TEST&to=12025550123,12025550124&subject=text&attachment=https%3A%2F%2Fexample.com%2Fexample.jpg&text=This+is+test+mms+from+TEST"
Note

Multiple numbers in the to parameter should be separated by commas (,).
The URL in attachment must be URL-encoded.
The text parameter should be appropriately escaped or URL-encoded (e.g., for spaces and symbols).


3. Request Parameters

ParameterTypeRequiredDescriptionExample
keystringYesAPI Key (composed of 8 letters or numbers), used to uniquely identify your account. Can be obtained in the PaaSoo dashboard.Abcdefgh
secretstringYesAPI Secret (composed of 8 letters or numbers), used in conjunction with the key for authentication. Can be obtained in the PaaSoo dashboard.Abc123EF
fromstringYesSender display name or number (Sender ID). Customization is supported in some countries. If you need to use a specific Sender ID, please contact technical support.TEST
tostringYesDestination Number, in the format of country code + phone number (without leading 00 or +).
  • Supports 1 - 5000 mobile numbers;
  • Multiple numbers are separated by commas (,).
12025550123,12025550124
textstringYesMMS text content, which can be used together with an image (attachment).This is test MMS from TEST
subjectstringNoMMS subject, usually not exceeding 20 characters (depending on Carrier restrictions). Some Operators/devices may display it in the title bar.text
attachmentstringYesThe URL of the image file attached to the MMS. It is recommended to use the storage link on the PaaSoo server. The size limit is generally under 300KB. If you need to send larger images, please contact PaaSoo to negotiate suitable Carrier routes and Pricing.https://example.com/example.jpg

4. Response Parameters

4.1 Response Fields

ParameterTypeDescriptionExample
statusintegerResponse status code submitted to the PaaSoo cloud communication platform.
API status code list:
  • 0 - success
  • 2 - Missing parameters
  • 3 - Invalid parameters
  • 4 - Invalid credentials
  • 5 - Unauthorized IP: IP Whitelist restriction
  • 6 - Invalid phone number
  • 7 - Invalid sender id
  • 8 - Message bombing detected: Repeated requests within 3 seconds
  • 9 - Quota exceeded: Insufficient Balance or credit limit
  • 10 - Throttling error: Rate limit exceeded (Throttling)
  • 11 - System error
  • 13 - Invalid attachment file: Invalid or inaccessible attachment
  • 14 - Nb of messages per request should be between 1 and 5000: Number limit exceeded
  • 18 - Invalid subject: Invalid subject or exceeds limit
0
status_codestringStatus description.Invalid credentials
batchidstringThe unique identifier for this batch request.a0018f-e4bf51-e000
dataarraySending details for each number.[...]

Fields in the data array

FieldTypeDescriptionExample
tostringDestination Number, country code + phone number format.12025550123
messageidstringMessage ID, the unique identifier for the MMS message.015bd4-d6dfa7-58w
statusintegerSingle message status code submitted to the PaaSoo cloud communication platform.
API status code list:
  • 0 - success
  • 2 - Missing parameters
  • 3 - Invalid parameters
  • 4 - Invalid credentials
  • 5 - Unauthorized IP
  • 6 - Invalid phone number
  • 7 - Invalid sender id
  • 8 - Message bombing detected
  • 9 - Quota exceeded
  • 10 - Throttling error
  • 11 - System error
  • 13 - Invalid attachment file
  • 18 - Invalid subject
0
status_codestringSingle message status description.Missing parameters

By default, this API provides highly elastic sending capabilities. If you receive the error code status=10 during invocation, it means your account has triggered custom Throttling based on your business agreement. To adjust the Throttling threshold, please contact your account manager or the PaaSoo technical support team (support@paasoo.com).

4.2 Success Response Example

{
"status": 0,
"status_code": "success",
"batchid": "a0018f-e4bf51-e000",
"data": [
{
"status": 0,
"to": "12025550123",
"messageid": "00018f-e4bf51-e002"
},
{
"status": 0,
"to": "12025550124",
"messageid": "00018f-e4bf51-e003"
}
]
}

4.3 Failure Response Example

{
"status": 4,
"status_code": "Invalid credentials."
}

5. Code Examples

Below are simple code examples showing how to integrate the Batch MMS API in several popular programming languages.

import requests

# API Endpoint
url = "https://api.paasoo.com/batch_mms"

# Form data
payload = {
"key": "API_KEY", # Replace with your API Key
"secret": "API_SECRET", # Replace with your API Secret
"from": "TEST", # Sender ID
"to": "12025550123,12025550124", # Destination Numbers, separated by commas
"subject": "text", # MMS subject
"attachment": "https://example.com/example.jpg", # Image file URL
"text": "This is a test MMS from TEST" # MMS content
}

# Request Headers
headers = {
"Content-Type": "application/x-www-form-urlencoded"
}

try:
# Send HTTP POST request
response = requests.post(url, data=payload, headers=headers)
response.raise_for_status()

# Parse and print JSON response
data = response.json()
if data.get("status") == 0:
print("Batch MMS sent successfully, batchid:", data.get("batchid"))
else:
print(f"Failed to send Batch MMS, status: {data.get('status')}, message: {data.get('status_code')}")

except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")

6. Best Practices and Precautions

  1. Number Limit: Each request supports 1 - 5000 numbers. Please ensure you stay within this range. If you need to send messages on a larger scale, please contact PaaSoo to negotiate a solution.
  2. Image Size Control and Pricing: It is generally not recommended to exceed 300KB. Some destinations may have additional requirements or Pricing differences based on image size and format. Please understand these in advance or consult PaaSoo.
  3. Content Compliance: Comply with local and international laws and Operator policies. Avoid sending prohibited content (e.g., adult content, gambling, politics).
  4. Testing and Verification: Before formal large-scale sending, be sure to conduct small-scale testing to check Delivery Rates, effectiveness, device compatibility, and costs.
  5. Concurrency and Rate Limits: When you need to send Batch MMS messages with high concurrency, please coordinate with PaaSoo in advance to avoid queue delays or Carrier route congestion caused by excessive sending rates.
  6. Callbacks and Status Reports: After successful sending, you can check the message status via the Callback / Webhook URL or in the PaaSoo dashboard; if your server provides a Callback, ensure security policies (Signature or IP Whitelist) are in place.

7. Appendix

  • Coverage: MMS coverage may differ from SMS coverage. Some countries or regions are not yet supported or require additional approval. If you have questions about destination countries, please consult your account manager.
  • Multimedia Transcoding: For some Operators or devices, PaaSoo may transcode or compress images to improve the Delivery Rate.
  • Billing Calculation: MMS Billing is usually based on successful submission to the Carrier, but specific Billing rules may vary by country or region. Please confirm with the commercial department.
  • Additional Support: If you have special requirements for reception effectiveness, device display, or sending stability, you can communicate with the PaaSoo team for more detailed support.
Support

If you encounter any technical issues or have business inquiries during the API integration, please do not hesitate to contact our Support team at support@paasoo.com. We are always here to assist you.