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:
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 thefallback-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 settingdisable-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
or001
). For example, the US number774-555-9144
in international number format would be17745559144
because the USA country code is1
.
- You can dynamically send custom text for each slide by populating the
custom-slides
object. Anycustom-slides
object must include thecustom-message-text
andcustom-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": [
- {
- "custom-message-text": "CUSTOM_MESSAGE_TEXT",
- "custom-slide": "CUSTOM_SLIDE_NUMBER"
}
]
}
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 | boolean Set to |
disable-fallback-sms-link | boolean Set to |
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 |
status-details | string More details about the status of the action. Returned with |
tracking-id | string Transaction ID for the request. Used for identifying postbacks received for this API request. Returned with |
to | string Destination phone number with country code. Returned when |
mms-id | string The ID of the sent MMS template. Returned when |
from | string Shortcode or Toll Free/10DLC number with country code that will be used to send a saved MMS. Returned when |
error-code | string Code that identifies the specific error that was encountered. Returned with |
error-info | string Message that explains the error code. Returned with |