This API stores an MMS from XML. The MMS may contain slides embedded with video, audio, images and text. Once the MMS is saved, it can be utilized by other functions through the MMSID returned. The legacy format is still supported at this time, but it is recommended that developers update to the most recent format at their earliest convenience.
When MMS is sent as SMS, the fallback SMS text and link are sent.
Line breaks are supported in the slide texts of the MMS.
<REQUEST> <ACTION>saveMMS</ACTION> <API_KEY>apiKey</API_KEY> <SUBJECT>Subject</SUBJECT> <NAME>Name to save it as</NAME> <FALLBACKSMSTEXT>Fallback Text if this MMS is sent as SMS</FALLBACKSMSTEXT> <DISABLEFALLBACKSMS>'yes' to disable fallback SMS</DISABLEFALLBACKSMS> <DISABLEFALLBACKSMSLINK>'yes' to disable fallback SMS link</DISABLEFALLBACKSMSLINK> <SLIDE> <IMAGE> <URL>URL</URL> </IMAGE> <TEXT>Plain Text</TEXT> <DURATION>Duration in seconds</DURATION> </SLIDE> <SLIDE> <AUDIO> <URL>*URL</URL> </AUDIO> <TEXT>Plain Text</TEXT> <DURATION>Duration in seconds</DURATION> </SLIDE> <SLIDE> <VIDEO> <URL>*URL</URL> </VIDEO> <TEXT>Plain Text</TEXT> <DURATION>Duration in seconds</DURATION> </SLIDE> <SLIDE> <VCARD> <URL>URL</URL> </VCARD> <TEXT>Plain Text</TEXT> <DURATION>Duration in seconds</DURATION> </SLIDE> <SLIDE> <ICAL> <URL>URL</URL> </ICAL> <TEXT>Plain Text</TEXT> <DURATION>Duration in seconds</DURATION> </SLIDE> <SLIDE> <PDF> <URL>URL</URL> </PDF> <TEXT>Plain Text</TEXT> <DURATION>Duration in seconds</DURATION> </SLIDE> <SLIDE> <PASSBOOK> <URL>URL</URL> </PASSBOOK> <TEXT>Plain Text</TEXT> <DURATION>Duration in seconds</DURATION> </SLIDE> <SLIDE> <PERSONALIZED-IMAGE> <TEMPLATE-ID>Personalized image template id</TEMPLATE-ID> </PERSONALIZED-IMAGE> <TEXT>Plain Text</TEXT> <DURATION>Duration in seconds</DURATION> </SLIDE> <SLIDE> ... </SLIDE> </REQUEST> *Any parameters passed in the URL are not supported and will be stripped out. To pass unique IDs, you must do so in the filename or in the file path.
API_URL?action=savemms &api_key=API key &subject=subject &name=name to save it as &fallbacksmstext=fallback Text if this MMS is sent as SMS &disablefallbacksms='yes' to disable fallback SMS &disablefallbacksmslink='yes' to disable fallback SMS link &slide_image_url_#=image URL (replace '#' with slide number) &slide_audio_url_#=audio URL (replace '#' with slide number) &slide_video_url_#=video URL (replace '#' with slide number) &slide_vcard_url_#=vCard URL (replace '#' with slide number) &slide_ical_url_#=iCal URL (replace '#' with slide number) &slide_pdf_url_#=PDF URL (replace '#' with slide number) &slide_passbook_url_#=passbook URL (replace '#' with slide number) &slide_personalized_image_template_id_#=personalized image template id (replace '#' with slide number) &slide_duration_#=duration in seconds (replace '#' with slide number) &slide_text_value_#=plain text (replace '#' with slide number)
Mandatory: action, api_key, name, slide, fallbackSmsText Optional: disableFallbackSms, disableFallbackSmsLink, subject, image, audio, video, url, text, duration, vcard, ical, pdf, passbook, personalized-image, template-id
status, mmsId, errorCode, errorInfo
<REQUEST> <ACTION>saveMMS</ACTION> <API_KEY>qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ</API_KEY> <SUBJECT>The subject</SUBJECT> <NAME>The name</NAME> <FALLBACKSMSTEXT>Fallback Text if this MMS is sent as SMS</FALLBACKSMSTEXT> <SLIDE> <IMAGE><URL>http://www.yoursite.com/images/1.jpg</URL></IMAGE> <AUDIO><URL>http://www.yoursite.com/audio/1.mp3</URL></AUDIO> <TEXT>Here is some text\rHere is some more text</TEXT> <DURATION>5</DURATION> </SLIDE> <SLIDE> <TEXT>This is my contact</TEXT> <VCARD><URL>http://www.yoursite.com/vcard/2.vcf</URL></VCARD> <DURATION>5</DURATION> </SLIDE> </REQUEST>
API_URL?action=savemms &api_key=qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ &subject=The subject &name=fishtank &fallbacksmstext=Fallback Text if this MMS is sent as SMS &slide_image_url_0=http://www.yoursite.com/images/1.jpg &slide_audio_url_0=http://www.yoursite.com/audio/1.mp3 $slide_text_value_0=Here is some text\rHere is some more text &slide_duration_0=5 &slide_text_value_1=This is my contact &slide_vcard_url_1=http://www.yoursite.com/vcard/2.vcf &slide_duration_1=5
<RESPONSE> <STATUS>Success</STATUS> <MMSID>35674</MMSID> </RESPONSE>
<RESPONSE> <STATUS>Failure</STATUS> <ERRORCODE>E225</ERRORCODE> <ERRORINFO>Too many Slides.</ERRORINFO> </RESPONSE>
When an MMS is saved, the system will generate a Postback notification and unlock MMS for further use. If an MMS contain audio/video, Postback will be sent when the encoding of the MMS audio/video is finished, otherwise Postback notification will be sent instantly. For more information, please visit the SaveMMS Encoding Status section of the Delivery Report Postback documentation.
You can save an MMS Template with merge tags and those tags will be replaced during delivery of the MMS as long as you pass the variables in the SendSavedMMS request.
For example:
<REQUEST> <ACTION>saveMMS</ACTION> <API_KEY>*********************************************</API_KEY> <SUBJECT>Text with the dynamic variables</SUBJECT> <NAME>MMS with DynVars</NAME> <SLIDE> <IMAGE> <URL>http://www.destination360.com/caribbean/bahamas/images/s/bahamas-boat-rental.jpg</URL> </IMAGE> <TEXT> Hello {$firstname|Sir}, your gender is {$gender|unknown}. </TEXT> </SLIDE> </REQUEST>
Then inside sendsavedMMS we do call this:
<REQUEST> <ACTION>sendsavedMMS</ACTION> <API_KEY>*********************************************</API_KEY> <MMSID>43615</MMSID> <FROM>66666</FROM> <TO>16502426058</TO> <CAMPAIGNREF>1807</CAMPAIGNREF> <DATA> <FIRSTNAME>Bill</FIRSTNAME> <GENDER>Male</GENDER> </DATA> </REQUEST>
and within the delivered MMS we will have this: “Hello Bill, your gender is male.”