sendSavedMMS

Synopsis:

This API sends stored content from a specified account using an MMSID to a single mobile number.

FROM must be one of the shortcodes allowed for your account. In case the number is from a different country than the FROM shortcode is assigned to, the default shortcode for those countries will be used.

When MMS is sent as SMS, the fallback SMS text and link are sent.

  • The fallback SMS text is the text used in place of the MMS subject. You can dynamically change the fallback SMS text by setting up the FALLBACKSMSTEXT node.
  • The fallback SMS link is the link that hosts the MMS content. The fallback SMS link may be disabled by passing ‘yes’ to the DISABLEFALLBACKSMSLINK node. In this case only the MMS subject or the fallback SMS Text is sent. By default, we always send the fallback SMS link along with the fallback SMS text or the MMS subject.
  • The fallback SMS can be completely disabled by passing ‘yes’ to the DISABLEFALLBACKSMS node. By default the fallback SMS is enabled. If the MMS will be sent as SMS while the fallback SMS is disabled, then the message will fail to send instead.

You can dynamically send custom text for each slide by setting up the CUSTOMTEXT node (CUSTOMTEXT must include mandatory fields: value and slide) and the MMS Subject by setting up the CUSTOMSUBJECT node. Line breaks are supported in the custom slide texts of the MMS.

If “Enforce Campaign Check” is turned ON, then this function will require the campaign reference ID of the messaging campaign that the recipient’s phone number is subscribed into to be passed inside the campaignref node.

Content Transcoding:

Every binary MMS we deliver can be transcoded for the destination handset and every web page we deliver is transcoded for the browsing handset. To transcode a binary MMS we must know what type of handset the user has. We are able to obtain this handset type information from delivery receipts and store the record in a handset cache for later use. We have a database of attributes which we manually match to every new handset in the cache so we can adapt the content during MMS delivery.

Passbook Pass:

This API also supports sending MMS with a Passbook Pass. The pass can be sent as a link by passing ‘yes’ to the FORCEPASSASLINK node.

Personalized Images:

This API also supports sending MMS with embedded Personalized Images. For this, you have to create a Personalized Image Template with merge tag vars in your account and add that to your MMS ID slide on the MMS Composer. You can send the personalized data for this template in the DATA node. Look at the request below to understand. Some additional notes:

  • If the Personalized Image Template contains a barcode and the merge tag var is set as “{$barcodeid}”, then the data for the barcode value can be supplied inside sub node under node.
  • If the Personalized Image Template contains at least one text area and the merge tag var is set to “{$firstname}”, then the data CAN be supplied inside sub node under node. If no data is supplied to the text areas, then the text areas will be empty/blank upon sending.
  • The background image URL in the personalized image supports gif, jpg, and png image file types. The image added in the personalized image will be converted into a jpg file upon sending. If the background image is not a gif, jpg, or png file or if the background image URL is invalid, then the request will fail and no message will be sent. The backgroud image will be resized if the file size is greater than 200 KB or if the width is greater than 640 px. If the dynamic image template already contains a background image, then it will be replaced with the background image passed in the request instead.

Dynamic vCards:

This API also supports sending MMS with embedded Dynamic vCard. The custom Dynamic vCard data can be supplied in the API. Look at the request below to understand. Some additional notes:

  • Only one dynamic vCard per request is allowed. A dynamic vCard must have some data added in the request.
  • The first and last names of the contact are required in the vCard. The first and last names can only contain alphanumeric, space “ “ and period “.” characters. The request will fail and no message will be sent if the first and last names are not included or if they contain special characters. The rest of the contact information are optional and can be empty.
  • Up to four phone numbers, four email addresses, and four physical addresses are supported in the vCard. The request will fail and no message will be sent if the limit is exceeded.
  • Currently the labels ‘work’ and ‘home’ are supported for the phone numbers, email addresses, and physical addresses labels in the vCard. If any other labels are used, then the request will fail and no message will be sent. If no label is added, then the default label ‘work’ is used.
  • The photo URL in the dynamic vCard supports gif, jpg, and png image file types. The image added in the dynamic vCard will be converted into a jpg file upon sending since vCards currently support jpg file type only. If the photo is not a gif, jpg, or png file or if the photo does not exist, then the request will fail and no message will be sent.
  • The order of the request parameters for a dynamic vCard does not matter.
  • Nothing needs to be added in the MMS template in order to send a dynamic vCard.
  • The dynamic vCard generated will automatically be attached to the last slide of the MMS upon sending.

Request: XML

<REQUEST>
    <ACTION>sendSavedMMS</ACTION>
    <API_KEY>apiKey</API_KEY>
    <MMSID>MMSID</MMSID>
    <TO>Number</TO>
    <FROM>Shortcode</FROM>
    <FROM_MASK>*shortcodeMask</FROM_MASK>
    <OPERATORID>OPERATORID</OPERATORID>
    <CAMPAIGNREF>CampaignReferenceID</CAMPAIGNREF>
    <FALLBACKSMSTEXT>This text replaces the MMS subject when MMS is sent as SMS link</FALLBACKSMSTEXT>
    <DISABLEFALLBACKSMS>'yes' to disable fallback SMS</DISABLEFALLBACKSMS>
    <DISABLEFALLBACKSMSLINK>'yes' to disable fallback SMS link</DISABLEFALLBACKSMSLINK>
    <CUSTOMTEXT>
        <VALUE>Custom Text for slide</VALUE>
        <SLIDE>Slide ID</SLIDE>
    </CUSTOMTEXT>
    <CUSTOMSUBJECT>MMS Custom Subject</CUSTOMSUBJECT>
    <DATA>
        <BARCODEID>Barcode ID</BARCODE>
        <FIRSTNAME>First Name</FIRSTNAME>
        <LASTNAME>Last Name</LASTNAME>
        <GENDER>Gender</GENDER>
        ...
    </DATA>
    <DYNAMICVCARD>
        <NAME>
            <FIRSTNAME>First Name</FIRSTNAME>
            <LASTNAME>Last Name</LASTNAME>
            <SUFFIX>Suffix Name</SUFFIX>
        </NAME>
        <ORGANIZATION>Organization Name</ORGANIZATION>
        <TITLE>Organization Title</TITLE>
        <PHOTOURL>Photo URL</PHOTOURL>
        <NOTE>Contact Note</NOTE>
        <PHONE>
            <NUMBER>Phone Number 1</NUMBER>
            <LABEL>Phone Label 1 (e.g. 'work' or 'home')</LABEL>
        </PHONE>
        <PHONE>
            <NUMBER>Phone Number 2</NUMBER>
            <LABEL>Phone Label 2 (e.g. 'work' or 'home')</LABEL>
        </PHONE>
        <EMAIL>
            <ID>Email Address</ID>
            <LABEL>Email Address Label (e.g. 'work' or 'home')</LABEL>
        </EMAIL>
        <PHYSICALADDRESS>
            <ADDRESS>Physical Address</ADDRESS>
            <LABEL>Physical Address Label (e.g. 'work' or 'home')</LABEL>
        </PHYSICALADDRESS>
    </DYNAMICVCARD>
</REQUEST>

*ShortcodeMask (Alphanumeric sender) is allowed only in few countries. Not supported in United States.

Request: GET

API_URL?action=sendsavedmms
&api_key=API key
&mmsid=MMSID
&to=number
&from=shortcode
&from_mask=shortcode mask
&operatorid=operator ID
&campaignref=campaign reference ID
&fallbacksmstext=this text replaces the MMS subject when MMS is sent as SMS link
&disablefallbacksms='yes' to disable fallback SMS
&disablefallbacksmslink='yes' to disable fallback SMS link
&customtext_#=Custom Text for slide             (replace '#' with slide number)
&customsubject=MMS Custom Subject
&data_first_name=first name
&data_last_name=last name
&data_age=age
...
&forcepassaslink='yes' to force pass as link
&di_bgimage=dynamic image: background image URL
&di_barcodeid=dynamic image: barcode ID
&di_textarea1=dynamic image: textarea text 1
&di_textarea2=dynamic image: textarea text 2
&di_textarea3=dynamic image: textarea text 3
&di_textarea4=dynamic image: textarea text 4
&di_textarea5=dynamic image: textarea text 5
&di_textarea6=dynamic image: textarea text 6
&di_textarea7=dynamic image: textarea text 7
&di_textarea8=dynamic image: textarea text 8
&di_savedata='yes' or 'no' to save the dynamic image data

Request Parameters:

Mandatory: action, api_key, mmsId, to, from, campaignRef (if "Enforce Campaign Check" IS enabled),
di_barcodeid (if saved MMS includes a personalized image with barcode),
firstname (if dynamicvcard is enabled), lastname (if dynamicvcard is enabled)

Optional: campaignRef (if "Enforce Campaign Check" is NOT enabled),
fallbackSmsText, disableFallbackSms, disableFallbackSmsLink, customText, customSubject, data, operatorid,
forcepassaslink,
di_barcodeid (if saved MMS does NOT include a personalized image with barcode),
di_textarea#, di_bgimage, di_savedata,
dynamicvcard, firstname (if dynamicvcard is NOT enabled), lastname (if dynamicvcard is NOT enabled)
suffix, organization, title, photourl, note,
phone_number_1, phone_label_1,
phone_number_2, phone_label_2,
email_id_1, email_label_1,
physical_address_1, physical_address_label_1

Response Parameters:

status, to, from, mmsId, trackingId, errorCode, errorInfo

Request Example: XML

<REQUEST>
    <ACTION>sendSavedMMS</ACTION>
    <API_KEY>qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ</API_KEY>
    <TO>16501234123</TO>
    <FROM>60856</FROM>
    <CAMPAIGNREF>Campaign123</CAMPAIGNREF>
    <MMSID>35674</MMSID>
    <FALLBACKSMSTEXT>Visit this link for more details</FALLBACKSMSTEXT>
    <CUSTOMTEXT>
        <VALUE>My Custom text in first slide\r\nAnd some more Custom text</VALUE>
        <SLIDE>1</SLIDE>
    </CUSTOMTEXT>
    <CUSTOMSUBJECT>My Custom Subject</CUSTOMSUBJECT>
    <DATA>
        <FIRST_NAME>John</FIRST_NAME>
        <LAST_NAME>Smith</LAST_NAME>
        <AGE>30</AGE>
        <PET>Dog</PET>
    </DATA>
    <DYNAMICIMAGE>
        <BACKGROUNDIMAGE>https://www.yourwebsite.com/images/backgroundimage.jpg</BACKGROUNDIMAGE>
        <BARCODEID>SKY-13332-433433</BARCODEID>
        <TEXTAREA1>Company-SKY</TEXTAREA1>
        <TEXTAREA2>Mr.XXXX</TEXTAREA2>
        <TEXTAREA3>Email:xxxx@yyyy.com</TEXTAREA3>
        <TEXTAREA4>Mobile:xxx-xxx-xxxx</TEXTAREA4>
    </DYNAMICIMAGE>
    <DYNAMICVCARD>
        <NAME>
            <FIRSTNAME>John</FIRSTNAME>
            <LASTNAME>Smith</LASTNAME>
            <SUFFIX>Jr.</SUFFIX>
        </NAME>
        <ORGANIZATION>My Organzation Name</ORGANIZATION>
        <TITLE>Agent</TITLE>
        <PHOTOURL>https://yourwebsite.com/contacts/photo1.png</PHOTOURL>
        <NOTE>My agent</NOTE>
        <PHONE>
            <NUMBER>(617) 314-7688</NUMBER>
            <LABEL>work</LABEL>
        </PHONE>
        <PHONE>
            <NUMBER>(617) 000-0000</NUMBER>
            <LABEL>home</LABEL>
        </PHONE>
        <EMAIL>
            <ID>johnsmith@yourorganzation.com</ID>
            <LABEL>work</LABEL>
        </EMAIL>
        <PHYSICALADDRESS>
            <ADDRESS>397 Moody St 202, Waltham, MA 02453-0461</ADDRESS>
            <LABEL>work</LABEL>
        </PHYSICALADDRESS>
    </DYNAMICVCARD>
</REQUEST>

Request Example: GET

https://secure.skycore.com/API/wxml/1.3/index.php?action=sendsavedmms
&api_key=qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ
&to=16501234123
&from=60856
&campaignref=Campaign123
&mmsid=35674
&fallbacksmstext=Visit+this+link+for+more+details
&customtext_1=My+Custom+text+in+first+slide\r\nAnd+some+more+Custom+text
&customsubject=My+Custom+Subject
&di_bgimage=https://www.yourwebsite.com/images/backgroundimage.jpg
&di_barcodeid=SKY-13332-4333433
&di_textarea1=Company-SKY
&di_textarea2=Mr.XXXX
&di_textarea3=Email%3Axxxx%40yyyy.com
&di_textarea4=Mobile%3Axxx-xxx-xxxx
&data_first_name=John
&data_last_name=Smith
&data_age=30
&data_pet=Dog

Response Example: Success

<RESPONSE>
    <STATUS>Success</STATUS>
    <MMSID>35674</MMSID>
    <TRACKINGID>TU1TXzU5Nzg3OQ==</TRACKINGID>
    <TO>16501234123</TO>
    <FROM>60586</FROM>
    <STATUSDETAILS>MMS request accepted and queued for delivery</STATUSDETAILS>
</RESPONSE>

Response Example: Failure

<RESPONSE>
    <STATUS>Failure</STATUS>
    <ERRORCODE>E713</ERRORCODE>
    <TO>16501234123</TO>
    <ERRORINFO>There is billing problem on your account</ERRORINFO>
</RESPONSE>

Postback Notification:

When the MMS delivery is processed successfully the system will generate a Postback notification. When an MMS delivery report is received the system will generate another Postback notification. Not all carriers provide MMS delivery receipts. For more details please visit the MMS MT Delivery Status section of the Delivery Report Postback documentation.


General Error Codes:

Code Description
E100 Invalid request. Make a valid request via GET/POST/XML with all the required variables.
E104 User Authentication Failed.
E105 This account has no API rights.
E106 You can call API every X seconds.
E107 This account has no rights to use this action.
E108 XML Parse error: $error.
E109 API not activated.
E112 IP was not whitelisted. API call rejected.
E113 Set throughput exceeded for this API action. API call rejected.
E114 Phone number is blacklisted. API call rejected.
E120 Account has reached the API request limit.
E503 Internal error.


Code Description
E110 Invalid receiver number.
E111 Invalid shortcode.
E241 This content does not exist.
E618 Carrier lookup failed. Please retry.
E619 Carrier not provisioned.
E620 The ‘mmsid’ is required.
E621 The ‘to’ is required.
E622 The ‘fallbacksmstext’ is required.
E626 Content unavailable. Encoding in progress, try again later.
E627 Invalid serviceid / serviceid is required
E628 Operator Not supported.
E629 Unrecognized content type.
E650 The ‘operator id’ is required.
E652 Incorrect disablefallbacksms value. It is optional, but accepts only ‘yes’, ‘no’ or ‘’ if set.
E713 There is billing problem on your account.
E715 Number is not subscribed in this campaign
E718 The ‘campaignref’ is required
E721 Invalid campaignref
E803 ‘barcodevalue’ is required.
E1406 The background-image-url value is invalid.
E1501 There is no information added for the vCard.
E1502 Only jpg, png, and gif images are allowed for the photo in the vCard.
E1506 Phone number X added for the vCard is invalid.
E1507 Phone number X added for the vCard is blank.
E1508 Email id X added for the vCard is invalid.
E1509 Email id X added for the vCard is blank.
E1510 Physical address X added for the vCard is blank.
E1511 The photo url in the vCard does not exist.
E1512 The maximum number of phone numbers / email addresses / physical addresses (4) in the vCard has been exceeded.
E1515 The first or last name for the vCard is required.
E1516 Phone / Email / Physical address X label added for vCard is invalid.
E1517 Dynamic Image: Incorrect savedata value. It is optional, but accepts only ‘yes’ or ‘no’ if set.


Key Term Definitions:

Term Description
ACTION This is the name of the function you want to execute with the API.
API_KEY Random key that is assigned to an account that can be used for authorization instead of USER/PASS. You can find and regenerate this key on the ‘API Settings’ page.
CAMPAIGNREF Depending on your API settings, you may be required to subscribe users into a campaign first before sending them messages. If you are required to subscribe a user first, then a valid Campaign Reference is required. This would be the campaign reference ID (string) to which the user is subscribed.
CUSTOMSUBJECT This is a custom subject that will overwrite the MMS Subject used in a sendSavedMMS function call.
CUSTOMTEXT This is custom text that will overwrite a given slide text used in a sendSavedMMS function call.
FROM A valid shortcode or longcode for the sender address(string). When sending to a list of many numbers using the ‘sendSavedContent’ function and if the ‘FROM’ value cannot be used for a certain country, then the system will re-write the sender address to use a valid shortcode for those numbers.
MMSID The ID(integer) of a saved MMS.
SLIDE This represents a single slide within the MMS sequence the could include IMAGE/URL/TEXT/PIC etc. (There are special rules for slides within the ‘saveMMS’ special consideration section).
TO This is the message recipient’s phone number in an international format.
TRACKINGID On success, the API returns with the tracking ID to identify sent messages. Upon API call failure, no tracking ID is returned. Once the message sending is processed you shall receive a postback containing TRACKINGID and the message status.