Currently the Ez.com API only supports GET calls to all methods. Below is documentation and sample code to use the API. API Keys are available only for registered accounts so Sign Up if you need one. You can obtain your API Key by going to your Profile page. Please report issues or ask questions by using our Contact Us Form. Thanks for giving the API a try!
http://ez.com/api/v1/ezlinks
It is always best to url encode all your variables especially the long url and notes. See sample code below on how do do this in PHP.
Examples
http://ez.com/api/v1/ezlinks/shrink?api_key=abc&Examples
{success: 1, ezlink: http://ez.com/e92j, hash: e92j}Must supply API Key in GET call
Parameters
Examples
http://ez.com/api/v1/ezlinks/shrink?api_key=abc&long_url=http://liveoak360.comExamples
http://ez.com/api/v1/ezlinks/shrink?api_key=abc&long_url=http://liveoak360.comExamples
http://ez.com/api/v1/ezlinks/shrink?api_key=abc&long_url=http://liveoak360.comNotes
Here for reference only – in order to accommodate future name spaced functions such as clicks, reports, charts, etc…
Parameters
Examples
http://ez.com/api/v1/ezlinks/shrink?api_key=abc&long_url=http://liveoak360.com¬es=abc&redirect_type=307Response Values
Examples
{success: 1, ezlink: http://ez.com/e92j, hash: e92j, ezlink_preview: http://ez.com/e92j?}Parameters
Examples
http://ez.com/api/v1/ezlinks/expand?ezlink=http://ez.com/eji9Response Values
Notes
API Key not required
Examples
{success: 1, long_url: http://liveoak360.com}
$request = 'http://ez.com/api/v1/ezlinks/shrink?api_key='
. rawurlencode('abc-key') . '&long_url='
. rawurlencode('http://liveoak360.com') . '¬es='
. rawurlencode('abc-notes');
$session = curl_init($request);
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($session);
curl_close($session);
$decode = json_decode($response, true);
//to see array
var_dump($decode);
$request = 'http://ez.com/api/v1/ezlinks/expand?ezlink='
. rawurlencode('http://ez.com/e3ja');
$session = curl_init($request);
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($session);
curl_close($session);
$decode = json_decode($response, true);
//to see array
var_dump($decode);