Skip to content

The sendmms action

The sendmms action sends an MMS defined directly in the JSON request to a single mobile number. It is useful when the customer does not need to store and reuse an MMS template.

The MMS may contain one or more slides with text and supported media objects such as image, audio, video, contact, calendar, PDF, and Excel content where enabled for the account. Slides are processed in the order provided in the request, although not all handsets or messaging clients render MMS content in the same way.

All requests are made as HTTPS POST requests with UTF-8 encoded JSON in the request body. Each request must include Content-Type: application/json; charset=utf-8 and the account API key in the x-api-key HTTP header.

Note:

If the same content will be sent repeatedly, consider savemms followed by sendsavedmms so content can be stored/transcoded once and reused.

Note:

For sendmms, image content is optimized, but audio and video are not transcoded in the same way as saved templates. For video-heavy use cases, savemms followed by sendsavedmms is recommended.

Endpoint and headers

POST https://api.ci.mblox.com/ep/v2/
Content-Type: application/json; charset=utf-8
x-api-key: YOUR_API_KEY_HERE

Request parameters

ParameterRequired/OptionalTypeDescription
actionRequiredStringMust be sendmms.
service-idRequired if configured for the accountStringCampaign or service identifier when required by account configuration.
toRequiredStringDestination phone number with country code. Do not include + or dialing prefixes.
to-displayonlyOptionalStringComma-separated list of display-only group participants. Delivery is only attempted to to.
fromRequiredStringProvisioned Short Code, Toll-Free, or 10DLC sender with country code.
from-maskOptionalStringAlphanumeric sender mask where supported. Not supported in the USA.
message-subjectOptionalStringMMS subject. Limit to 40 characters for best deliverability. Maximum 80 characters. Unicode/emojis may not be supported.
fallback-sms-textRequired when fallback is enabled and disable-fallback-sms is falseStringText sent if MMS is delivered as SMS fallback. Limit to 110 characters for best deliverability.
disable-fallback-smsOptionalBooleanSet true to disable fallback SMS.
disable-fallback-sms-linkOptionalBooleanSet true to prevent appending the hosted MMS link to fallback SMS.
fallback-sms-link-expirationOptionalString date-timeExpiration for SMS fallback link. Defaults to 1 year. Maximum 1 year. ISO 8601 format.
mms-expiry-timestampOptionalString date-timeStops MMS delivery attempts after this timestamp. Defaults to 3 days. Maximum 3 days. ISO 8601 format.
client-referenceOptionalStringCustomer transaction ID. Passed back in postbacks. Maximum 64 characters.
cache-contentOptionalBooleanCaching is enabled by default unless set to false.
slideRequiredArrayOne or more slide objects. Maximum 8 slides.

Slide parameters

ParameterRequired/OptionalTypeDescription
slide[].message-textOptional; required if no media/object is providedStringText delivered with the slide. Plain text. Maximum 5,000 characters.
slide[].image.urlOptionalStringPublic URL for image content. Supports JPG/JPEG, PNG, GIF, and WEBP when enabled.
slide[].audio.urlOptionalStringPublic URL for audio content. Supports MP3, WAV, and AMR.
slide[].video.urlOptionalStringPublic URL for video content. Supports MP4, MPEG, AVI, WMV, MOV, and 3GP.
slide[].contact.urlOptionalStringPublic URL for vCard contact object.
slide[].calendar.urlOptionalStringPublic URL for iCalendar object.
slide[].pdf.urlOptionalStringPublic URL for PDF object.
slide[].ms-excel.urlOptionalStringPublic URL for Excel object where supported.

Fallback SMS considerations

If an MMS is too large to deliver or if a carrier does not support MMS delivery, the API may deliver the content as fallback SMS if enabled. Fallback SMS consists of fallback-sms-text and, by default, a link to view the MMS content.

FieldBehavior
fallback-sms-textText sent when MMS is delivered as SMS fallback. Required when fallback is enabled and disable-fallback-sms is false.
disable-fallback-smsWhen true, fallback SMS delivery is disabled.
disable-fallback-sms-linkWhen true, the hosted MMS content link is not appended to fallback SMS text.
fallback-sms-link-expirationExpiration date/time for the fallback SMS link. Defaults to 1 year. Maximum 1 year.

Group messaging with to-displayonly

Group messaging or group chat display behavior is supported by using the to-displayonly field. The field contains a comma-separated list of phone numbers with country code.

Note:

to-displayonly is a display/pass-through field. Delivery is only attempted to the recipient in the to field. To deliver to every participant, submit one API request per recipient in the to field and include the other participants in to-displayonly.

Special considerations

  • Always submit destination and sender numbers in international number format. Include the country code and phone number. Do not include dialing prefixes such as 00 or 001 and do not include the plus sign.
  • Media URLs must include the full absolute path, including http:// or https://.
  • The hosting server must return a valid Content-Length header.
  • The hosting server must return a valid Content-Type header.
  • Chunked transfer encoding may be rejected if a Content-Length header is not provided.
  • Accepted HTTP status codes for media retrieval are 200, 301, 302, 303, 307, and 308.
  • For 3xx redirects, only one redirect is followed.
  • Each MMS must include at least one slide.
  • A maximum of 8 slides per submission is supported in this implementation.
  • Each slide may include message-text and one supported media/object type.
  • Do not include more than one file of the same MIME type on the same slide.
  • Image slides may include audio and text, but not video.
  • Audio slides may include text, but not video.
  • Video slides may include text, but not image or audio.
  • Object slides such as contact, calendar, PDF, and Excel should not be combined with image, audio, or video.

Example: Send MMS without group messaging

curl -i -X POST \
  https://api.ci.mblox.com/ep/v2/ \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "action": "sendmms",
    "service-id": "campaign-123",
    "to": "17745550001",
    "from": "18885551234",
    "message-subject": "Deal of the Day",
    "fallback-sms-text": "We could not deliver the MMS. View it here:",
    "disable-fallback-sms": false,
    "disable-fallback-sms-link": false,
    "client-reference": "order-12345",
    "slide": [
      {
        "image": {
          "url": "https://example.com/content/deal.png"
        },
        "message-text": "Hello! Here is today's deal."
      }
    ]
  }'

Example: Send MMS with group messaging display

curl -i -X POST \
  https://api.ci.mblox.com/ep/v2/ \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "action": "sendmms",
    "service-id": "campaign-123",
    "to": "17745550001",
    "to-displayonly": "17745550002,17745550003",
    "from": "18885551234",
    "fallback-sms-text": "We could not deliver the MMS. View it here:",
    "disable-fallback-sms": false,
    "slide": [
      {
        "image": {
          "url": "https://example.com/content/group-image.jpg"
        },
        "message-text": "Team reminder: the event starts at 6 PM."
      }
    ]
  }'

Success response example

{
  "status": "success",
  "tracking-id": "abc123xyz",
  "to": "17745550001",
  "from": "18885551234",
  "status-details": "MMS request accepted and queued for delivery."
}

Failure response example

{
  "status": "failure",
  "error-code": "E111",
  "error-info": "Invalid Sender."
}

Response schema

FieldPresenceTypeDescription
statusAlwaysStringsuccess or failure.
status-detailsSuccess onlyStringAdditional information about the accepted request.
tracking-idSuccess for send actionsStringTransaction ID used to link API requests to postbacks.
toSuccess for sendmmsStringDestination phone number.
fromSuccess for sendmmsStringSender number.
error-codeFailure onlyStringError code identifying the failure condition.
error-infoFailure onlyStringHuman-readable error details.