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.
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.
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.
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 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 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.
- 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.
https://api.ci.mblox.com/ep/v2
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.ci.mblox.com/ep/v2/ \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"value": {
"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"
}
]
}
}'
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.
The ID of the MMS template.
The ID of the campaign.
Destination phone number with country code.
Shortcode, or Toll Free, or 10DLC with country code.
Only carriers in certain countries allow Alphanumeric senders. Not supported in the USA.
MMS subject text. Limit to 40 characters for best deliverability. Maximum of 80 characters.
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.
Set to true
to disable the SMS fallback. Overrides the setting saved in the MMS Template.
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.
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 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.
Customer transaction ID of the request. Passed back in all postbacks for this transaction. Maximum length of 64 characters.
Custom slides to dynamically replace the text of already specified slides at the time of sending.
Indicates the status of the action. Either success
or failure
.
More details about the status of the action. Returned with success
status for any action.
Transaction ID for the request. Used for identifying postbacks received for this API request. Returned with success
status for any action.
Destination phone number with country code. Returned when sendmms
or sendsavedmms
have a success
status.
The ID of the sent MMS template. Returned when sendsavedmms
has a success
status.
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.
Code that identifies the specific error that was encountered. Returned with failure
status for any action.
Message that explains the error code. Returned with failure
status for any action.