Short Menu supports either GET
requests with URL parameters or POST
requests with a body. The least information required is your API Endpoint and the parameter key used to send the long URL:
https://my-service.com/api-endpoint.php
longUrl
If your service supports custom keywords, you can also add the parameter key used to send the custom keyword:
keyword
Short Menu provides the option to add or override header fields of the request.
The URL Parameter Key
and Keyword Parameter Key
will be added to the URL Parameters or body automatically. If your service requires additional static parameter and key combinations, you can easily add them in the bottom table. The values you enter will be url encoded automatically when creating the request.
When using POST
requests, you can choose whether Short Menu uses an x-www-form-urlencoded
or JSON
body. The corresponding header field Content-Type
will be set automatically.
The response received from your server must either be plain text
, containg only the shortened URL, or JSON
. The following JSON
formats are supported by Short Menu:
{ "shorturl" : "SHORT_URL_HERE" }
{ "shortURL" : "SHORT_URL_HERE" }
{ "short" : "SHORT_URL_HERE" }
{ "id" : "SHORT_URL_HERE" }
{ "url_short" : "SHORT_URL_HERE" }
{ "data" : { "url" : "SHORT_URL_HERE" } }
{ "message" : "ERROR_MESSAGE_HERE" }
Your API can also return an array whose first object is a dictionary conforming to one of the above formats.