(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TT9ZP96');

Get MMS Templates API

Table of Contents

getMMSTemplates

Synopsis:

List all the previously created MMS templates (mms-ids) created using the saveMMS API. Note, deleted templates are not included in this listing. All the MMS templates will be listed in the descending order of date (i.e., latest to the oldest). If no “start-date” is specified in the API request then by default all mms templates are listed. The default “page-number” is taken as 1 whereas the default “items-per-page” is 100, if not specified. GMT/UTC timestamps are accepted for “start-date”.

The poster URL of an MMS template represents the content that could be used as the MMS preview poster. It is only returned in the response if the MMS Template contains either a video and/or image in any of its slides. The poster URL is generated based on the first content type (either image or video) to appear in the slides ordered within the MMS Template. Thus it will not be generated if the MMS Template only contains plain text or any other types of objects such as audio, pass, pdf, ical, and vcard.

Request: XML

<REQUEST>
    <ACTION>getMMSTemplates</ACTION>
    <API_KEY>apiKey</API_KEY>
    <START_DATE>startdate</START_DATE>
    <PAGE_NUMBER>pagenumber</PAGE_NUMBER>
    <ITEMS_PER_PAGE>itemsperpage</ITEMS_PER_PAGE>
</REQUEST>

Request Parameters:

TermMandatory/OptionalDescription
ACTIONMandatoryThis is the name of the function you want to execute with the API.
API_KEYMandatoryRandom 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.
START_DATEOptionalMMS templates created later than this date are listed.
PAGE_NUMBEROptionalPage number to list paginated MMS templates.
ITEMS_PER_PAGEOptionalTotal number of MMS items per page.

Response Parameters:

Param NamePresenceDescription
STATUSAlways“Success” or “Failure”.
START_DATESuccess Response OnlyMMS templates created later than this date are listed.
PAGE_NUMBERSuccess Response Only Page number to list paginated MMS templates.
ITEMS_PER_PAGESuccess Response OnlyTotal number of MMS items per page.
TOTAL_RESULTSSuccess Response OnlyThe total number of MMS templates returned based on the request parameters.
MMS_TEMPLATESuccess Response Only The list of MMS templates returned based on the request parameters.
MMS_TEMPLATE:MMSIDSuccess Response OnlyThe ID (bigint) of a saved MMS.
MMS_TEMPLATE:NAMESuccess Response OnlyMMS template name for internal reference only.
MMS_TEMPLATE:SUBJECTSuccess Response OnlyMMS Subject text. Limit subject to 40 characters for best deliverability. No unicode (emojis).
MMS_TEMPLATE:FALLBACK_SMS_TEXTSuccess Response OnlyText which gets sent when MMS is sent as SMS fallback. Limit text to 110 characters for best deliverability.
MMS_TEMPLATE:DATE_CREATEDSuccess Response OnlyThe date of the MMS template creation.
MMS_TEMPLATE:TOTAL_SLIDESSuccess Response OnlyThe total number of slides in the MMS template.
MMS_TEMPLATE:SIZESuccess Response OnlyThe size of the MMS template.
MMS_TEMPLATE:POSTER_URLSuccess Response OnlyThe poster URL represents the content that could be used as the MMS preview poster.
ERRORCODEError response onlyError code associated with the error.
ERRORINFOError response onlyError message explaining the error code.

Request Example: XML

<REQUEST>
    <ACTION>getMMSTemplates</ACTION>
    <API_KEY>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</API_KEY>
    <START_DATE>2014-03-31T11:30:00+00:00</START_DATE>
    <PAGE_NUMBER>1</PAGE_NUMBER>
    <ITEMS_PER_PAGE>3</ITEMS_PER_PAGE>
</REQUEST>

Response Example: Success

<RESPONSE>
    <STATUS>Success</STATUS>
    <START_DATE>2014-03-31T11:30:00+00:00</START_DATE>
    <PAGE_NUMBER>1</PAGE_NUMBER>
    <ITEMS_PER_PAGE>3</ITEMS_PER_PAGE>
    <TOTAL_RESULTS>3</TOTAL_RESULTS>
    <MMS_TEMPLATE>
         <MMSID>1234</MMSID>
         <NAME>MMS-4</NAME>
         <SUBJECT>subject-4</SUBJECT>
         <FALLBACK_SMS_TEXT>sms-fallback-4</FALLBACK_SMS_TEXT>
         <DATE_CREATED>2014-10-31T09:30:00+00:00</DATE_CREATED>
         <TOTAL_SLIDES>2</TOTAL_SLIDES>
         <SIZE>2048</SIZE>
         <POSTER_URL>https://mobilecontent-public.s3.amazonaws.com/userdata/ZVCH0wbKxJTx/mms/1234/image/1/Cyfwc0i7/test4.jpg</POSTER_URL>
    </MMS_TEMPLATE>
    <MMS_TEMPLATE>
         <MMSID>1233</MMSID>
         <NAME>MMS-3</NAME>
         <SUBJECT>subject-3</SUBJECT>
         <FALLBACK_SMS_TEXT>sms-fallback-3</FALLBACK_SMS_TEXT>
         <DATE_CREATED>2014-10-30T19:00:00+00:00</DATE_CREATED>
         <TOTAL_SLIDES>4</TOTAL_SLIDES>
         <SIZE>4096</SIZE>
         <POSTER_URL>https://mobilecontent-public.s3.amazonaws.com/userdata/ZVCH0wbKxJTx/mms/1233/video/2/FrLuhRoX/test3.jpg</POSTER_URL>
    </MMS_TEMPLATE>
    <MMS_TEMPLATE>
         <MMSID>1230</MMSID>
         <NAME>MMS-2</NAME>
         <SUBJECT>subject-2</SUBJECT>
         <FALLBACK_SMS_TEXT>sms-fallback-2</FALLBACK_SMS_TEXT>
         <DATE_CREATED>2014-10-30T08:30:00+00:00</DATE_CREATED>
         <TOTAL_SLIDES>2</TOTAL_SLIDES>
         <SIZE>5126</SIZE>
         <POSTER_URL></POSTER_URL>
    </MMS_TEMPLATE>
</RESPONSE>

Response Example: Failure

<RESPONSE>
    <STATUS>Failure</STATUS>
    <ERRORCODE>E214</ERRORCODE>
    <ERRORINFO>startdate is invalid.</ERRORINFO>
</RESPONSE>

General Error Codes:

CodeDescription
E100Invalid request. Make a valid request via GET/POST/XML with all the required variables.
E104User Authentication Failed.
E105This account has no API rights.
E106You can call API every X seconds.
E107This account has no rights to use this action.
E108XML Parse error: $error.
E109API not activated.
E112IP was not whitelisted. API call rejected.
E113Set throughput exceeded for this API action. API call rejected.
E114Phone number is blacklisted. API call rejected.
E120Account has reached the API request limit.
E503Internal error.
CodeDescription
E212pagenumber is invalid.
E213itemsperpage is invalid.
E214startdate is invalid.
Go to Top