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:
Term | Mandatory/Optional | Description |
---|---|---|
ACTION | Mandatory | This is the name of the function you want to execute with the API. |
API_KEY | Mandatory | 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. |
START_DATE | Optional | MMS templates created later than this date are listed. |
PAGE_NUMBER | Optional | Page number to list paginated MMS templates. |
ITEMS_PER_PAGE | Optional | Total number of MMS items per page. |
Response Parameters:
Param Name | Presence | Description |
---|---|---|
STATUS | Always | “Success” or “Failure”. |
START_DATE | Success Response Only | MMS templates created later than this date are listed. |
PAGE_NUMBER | Success Response Only | Page number to list paginated MMS templates. |
ITEMS_PER_PAGE | Success Response Only | Total number of MMS items per page. |
TOTAL_RESULTS | Success Response Only | The total number of MMS templates returned based on the request parameters. |
MMS_TEMPLATE | Success Response Only | The list of MMS templates returned based on the request parameters. |
MMS_TEMPLATE:MMSID | Success Response Only | The ID (bigint) of a saved MMS. |
MMS_TEMPLATE:NAME | Success Response Only | MMS template name for internal reference only. |
MMS_TEMPLATE:SUBJECT | Success Response Only | MMS Subject text. Limit subject to 40 characters for best deliverability. No unicode (emojis). |
MMS_TEMPLATE:FALLBACK_SMS_TEXT | Success Response Only | Text which gets sent when MMS is sent as SMS fallback. Limit text to 110 characters for best deliverability. |
MMS_TEMPLATE:DATE_CREATED | Success Response Only | The date of the MMS template creation. |
MMS_TEMPLATE:TOTAL_SLIDES | Success Response Only | The total number of slides in the MMS template. |
MMS_TEMPLATE:SIZE | Success Response Only | The size of the MMS template. |
MMS_TEMPLATE:POSTER_URL | Success Response Only | The poster URL represents the content that could be used as the MMS preview poster. |
ERRORCODE | Error response only | Error code associated with the error. |
ERRORINFO | Error response only | Error 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:
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. |
Related Error Codes:
Code | Description |
---|---|
E212 | pagenumber is invalid. |
E213 | itemsperpage is invalid. |
E214 | startdate is invalid. |