Capture API
Currently the Capture 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 visiting our Support site. Thanks for giving the API a try!
API Primary Base URL
http://capture.44doors.com/api/v2
Request Variables in GET call
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://capture.44doors.com/api/v2/links/shrink?api_key=abc&long_url=http%3A%2F%2Fwww.44doors.com¬es=some%20long%20notes
Responses in JSON or plain text
Examples
{success: 1, link: http://Ez.com/e92j, hash: e92j}http://Ez.com/e92j
Authentication
Must supply API Key in GET call
Parameters
- api_key As assigned in Capture registered account
Examples
http://capture.44doors.com/api/v2/links/shrink?api_key=abc&long_url=http://44doors.comShrink with /links/shrink
Parameters
- long_url A long URL you wish to shrink
- notes The notes to attach to the newly created link. (Note: can be changed later)
- alias Custom alias you wish to assign to short link. (optional)
- format Choose txt or json (Note: json is default)
- dupe_check Set to 1 if you want system to return last created short link that matches long_url (character for character and case sensitive) instead of creating a new short link.
Examples
http://capture.44doors.com/api/v2/links/shrink?api_key=abc&long_url=http://44doors.com¬es=abc&alias=abcdJSON Response Values
- link Full URL of Link
- hash Hash value of Link
- link_preview Full URL of preview link
Examples
{success: 1, link: http://Ez.com/e92j, hash: e92j, link_preview: http://Ez.com/e92j?}{"success":0,"error_code":400,"error_message":"Link/Custom Alias is not available! Try another."}
{success: 0, error_code: 100, error_message: "Invalid API key."}
http://Ez.com/e92j
Expand with /links/expand
Parameters
- link Link you wish to expand. (Note: will only accept full URL of Link)
Examples
http://capture.44doors.com/api/v2/links/expand?link=http://Ez.com/eji9http://capture.44doors.com/api/v2/links/expand?link=http://go.44doors.com/eji9
Response Values
- long_url Full URL of expanded Link
Notes
API Key not required
Examples
{success: 1, long_url: http://44doors.com}{success: 0, error_code: 100, error_message: "Invalid API key."}
Click count with /clicks/count
Parameters
- link Link you wish to receive click counts. (Note: will only accept full URL of Link)
- date_from Starting date of date range for click count YYYY-MM-DD (Note: optional unless date_to is set)
- date_to Ending date of date range for click count YYYY-MM-DD (Note: optional)
- daily If set to 1, will show a daily breakdown of counts
Examples (Note: first example will provide total click count for entire history)
http://capture.44doors.com/api/v2/clicks/count?api_key=abc&link=http://Ez.com/eji9http://capture.44doors.com/api/v2/clicks/count?api_key=abc&link=http://Ez.com/eji9&date_from=2010-01-01
http://capture.44doors.com/api/v2/clicks/count?api_key=abc&link=http://Ez.com/eji9&date_from=2010-01-01&date_to=2010-01-31&daily=1
http://capture.44doors.com/api/v2/clicks/count?api_key=abc&link=http://go.44doors.com/eji9&date_from=2010-01-01&date_to=2010-01-31&daily=1
Response Values
- link Full URL of Link
- hash Hash value of Link
- count Total click count for date range
- dates If daily set to 1, list of dates and count key-value pairs.
Examples
{success: 1, link: http://Ez.com/e92j, hash: e92j, count: 1390}{success: 1, link: http://Ez.com/e92j, hash: e92j, count: 154, dates: {"2010-01-01":29,"2010-01-02":80,"2010-01-03":45}}
{success: 0, error_code: 100, error_message: "Invalid API key."}
Display/Download a QR Code image for an existing link with /links/qr
Parameters
- link Link you wish to expand. (Note: will only accept full URL of Link)
- size Size of image. Excepts: small(120x120 pixels), med (177x177), large (500x500), xlarge (1000x1000) (Note: med is default)
- download If set to 1, force download of image otherwise will be printed to screen. (Note: default is 0)
Examples
http://capture.44doors.com/api/v2/links/qr?link=http://Ez.com/eji9http://capture.44doors.com/api/v2/links/qr?link=http://go.44doors.com/eji9&size=large&download=1
Notes
API Key not required
Examples
{success: 0, error_code: 100, error_message: "Invalid API key."}
Sample PHP code using curl to shrink a URL
$request = 'http://capture.44doors.com/api/v2/links/shrink?api_key='
. rawurlencode('abc-key') . '&long_url='
. rawurlencode('http://44doors.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);
Sample PHP code using curl to expand a Link
$request = 'http://capture.44doors.com/api/v2/links/expand?link='
. 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);





