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: GET

API_URL?action=getmmstemplates
&api_key=API key
&start_date=start date
&page_number=page number
&items_per_page=items per page

Request Parameters:

Mandatory: action, api_key
Optional: start_date, page_number, items_per_page

Response Parameters:

status, start_date, page_number, items_per_page, total_results, mms_template, mmsid, name, subject, fallback_sms_text, date_created, total_slides, size, poster_url, errorCode, errorInfo

Request Example: XML

<REQUEST>
    <ACTION>getMMSTemplates</ACTION>
    <API_KEY>qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ</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>

Request Example: GET

https://secure.skycore.com/API/wxml/1.3/index.php?action=getmmstemplates
&api_key=qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ
&start_date=2014-03-31T11:30:00+00:00
&page_number=1
&items_per_page=3

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.

Key Term Definitions:

TermDescription
ACTIONThis is the name of the function you want to execute with the API.
API_KEYRandom 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_DATEMMS templates created later than this date are listed.
PAGE_NUMBERPage number to list paginated MMS templates.
ITEMS_PER_PAGETotal number of MMS items per page.
MMSIDThe ID(integer) of a saved MMS.