API documentation

You can shorten URLs by just making an HTTP GET method to http://shortmy.link/Api.html

Parameters:

  • url: This is the long URL you want to shrink.
  • expire: This is the expiration date and time of the shortened URL, this parameter is optional, default value is does not expire. Correct format is: month/day/year hour:minute, for example: 01/20/1980 22:15
  • preview: true if you want to let the user preview the destination URL, false otherwise; this parameter is also optional, default value is disabled.

Remember to properly URL encode each parameter value.

Examples::

  • http://shortmy.link/Api.html?url=http%3a%2f%2fyahoo.com&expire=01%2f20%2f1980+22%3a15&preview=true
    This request will generate a short URL for "http://yahoo.com" that will expire on "01/20/1980 22:15" with preview enabled.
  • http://shortmy.link/Api.html?url=http%3a%2f%2fmsn.com
    This request will generate a short URL for "http://msn.com" with no expiration and preview disabled.

The result of this request is an XML in the following format:

<result>
    <state>success/failure</state>
    <url>shortened url</url>
    <message>result message</message>
</result>