The sendsavedmms action

This action sends the saved MMS template, specified by an mms-id, to a single mobile number. The sender number must be one of the shortcodes/longcodes allowed for your account. The receiver number must be within the same country as the selected shortcode/longcode.

Important:
Sinch will send an HTTP GET request to the server that is specified in the XML slide of the embedded images, videos, audios, and/or other object URIs to retrieve the contents of the media file. The HTTP response header Sinch receives from the server MUST contain the Content-Length field indicating the size of the resource. Otherwise, the API request will fail. Customers using CDNs that employ chunked transfer encoding may run into problems in which the server returns a Transfer-Encoding field with a value of chunked specified in the HTTP GET response, rather than the server returning Content-Length. If a Transfer-Encoding field with a value of chunked is specified in an HTTP, the API request will be rejected.

Important:

All media files are expected to serve a valid content-type header (for example, text/plain, image/gif, audio/mp3, video/mp4, etc.). If a file server serves a file using the application/octet-stream content-type header instead, it may be rejected if the MIME type cannot be determined by other means.

Fallback SMS considerations

If the MMS message is too large to be delivered or the carrier does not support MMS delivery, the API has an option to facilitate MMS delivery as fallback SMS. The fallback SMS consists of two parts: the fallback SMS text and the fallback SMS link.

The fallback SMS text

The fallback SMS text is the SMS text that will be sent instead of the MMS. The fallback SMS link, used to view the MMS content, is also sent. You can dynamically change the fallback SMS text by populating the fallback-sms-text field. If disable-fallback-sms is set node is set to true, then the fallback SMS text is not required. By default, the fallback SMS is enabled. If the MMS was attempted to be sent as SMS and the fallback SMS is disabled, the message sending will fail.

The fallback SMS link

The fallback SMS link is the link that hosts the MMS content. The fallback SMS link may be disabled by setting disable-fallback-sms-link to true; in this case only the fallback SMS text is sent. By default, we always send the fallback SMS link along with the fallback SMS text.

The fallback SMS link expiration defines how long the MMS sent as SMS using this mms-id is valid and viewable on the mobile browser. By default, it is set to one year if no value is passed. The maximum expiration duration cannot be more than one year.

Special considerations

  • Always use international number format. You must use the international format when sending MMS. International format includes both the country code and the phone number. We use the country code to determine routing of the message. There should be no dialing prefixes (for example, no 00 or 001). For example, the US number 774-555-9144 in international number format would be 17745559144 because the USA country code is 1.
  • You can dynamically send custom text for each slide by populating the custom-slides object. Any custom-slides object must include the custom-message-text and custom-slide fields. Line breaks are supported in the custom slide texts of the MMS.

Sample payload

{
  • "action": "sendsavedmms",
  • "mms-id": "MMS_TEMPLATE_ID",
  • "service-id": "YOUR_CAMPAIGN_ID",
  • "to": "RECIPIENT_PHONE_NUMBER_WITH_COUNTRY_CODE",
  • "from": "YOUR_PHONE_NUMBER",
  • "from-mask": "YOUR_MASK",
  • "message-subject": "YOUR_SUBJECT_TEXT",
  • "fallback-sms-text": "TEXT_OF_FALLBACK_SMS",
  • "disable-fallback-sms": false,
  • "disable-fallback-sms-link": false,
  • "mms-expiry-timestamp": "MMS_EXPIRY_TIMESTAMP_UTC",
  • "client-reference": "CLIENT_SUPPLIED_IDENTIFIER",
  • "custom-slides": [
    • {
      }
    ]
}

Sample response

{
  • "status": "success",
  • "mms-id": "ID_OF_MMS_TEMPLATE",
  • "tracking-id": "UNIQUE-TRANSACTION-ID",
  • "to": "DESTINATION_PHONE_NUMBER",
  • "from": "ORIGIN_PHONE_NUMBER",
  • "status-details": "MMS request accepted and queued for processing and delivery."
}

Schema

action
required
string
Default: "sendsavedmms"

The action for this API request. In this case, the API sends the saved MMS Template from a specified account, using an MMSID, to a single mobile number.

mms-id
required
string

The ID of the MMS template.

service-id
required
string

The ID of the campaign.

to
required
string

Destination phone number with country code.

from
required
string

Shortcode, or Toll Free, or 10DLC with country code.

from-mask
string

Only carriers in certain countries allow Alphanumeric senders. Not supported in the USA.

message-subject
string

MMS subject text. Limit to 40 characters for best deliverability. Maximum of 80 characters.

fallback-sms-text
string

Mandatory if disable-fallback-sms is set to false. Text which is sent when message is sent as SMS fallback. Overrides the setting saved in the MMS template. Limit the number of characters used in the text to between 20 and 110 characters for best results.

disable-fallback-sms
boolean

Set to true to disable the SMS fallback. Overrides the setting saved in the MMS Template.

disable-fallback-sms-link
boolean

Set to true to disable appending a link to the MMS content at the end of the SMS fallback text. Overrides the setting saved in the MMS Template.

fallback-sms-link-expiration
string <date-time>

Expiration for the SMS fallback link. If not populated, defaults to 1 year from the time and date at which the API request was made. Maximum of 1 year. Accepts ISO8601 Date format. Only applies to fallback SMS messages.

mms-expiry-timestamp
string <date-time>

MMS delivery attempts will stop after the date and time specified in this field. If the MMS is already delivered to the device, it will remain in the device's inbox. If not populated, the expiration value defaults to 3 days from the time and date at which the API request was made. Maximum of 3 days. Accepts ISO8601 Date format.

client-reference
string

Customer transaction ID of the request. Passed back in all postbacks for this transaction. Maximum length of 64 characters.

Array of objects

Custom slides to dynamically replace the text of already specified slides at the time of sending.

Response schema

status
string

Indicates the status of the action. Either success or failure.

status-details
string

More details about the status of the action. Returned with success status for any action.

tracking-id
string

Transaction ID for the request. Used for identifying postbacks received for this API request. Returned with success status for any action.

to
string

Destination phone number with country code. Returned when sendmms or sendsavedmms have a success status.

mms-id
string

The ID of the sent MMS template. Returned when sendsavedmms has a success status.

from
string

Shortcode or Toll Free/10DLC number with country code that will be used to send a saved MMS. Returned when sendsavedmms has a success status.

error-code
string

Code that identifies the specific error that was encountered. Returned with failure status for any action.

error-info
string

Message that explains the error code. Returned with failure status for any action.

We'd love to hear from you!
Rate this content:
Still have a question?
 
Ask the community.