Home > Adjix Open API

 

 

Adjix Open API


The Adjix Open API is simple and straight forward with several examples below. Simply send an http request to our server with the URL (link) to shrink. You should also include the partner ID or e-mail ID so Linkers can track their link click data and receive credit for ads that run when their links are clicked. Be sure to properly encode your request (i.e. spaces in the URL should be encoded as %20, etc.). Linker's can find their partner ID under their Linker profile.

Additionally, you may include the ad type (at) parameter (also known as the ad category), which will associate the link with a specific ad category, by setting the parameter to an integer between 0 and 25 according to this table.

An API call without a specific ad type will use the the Linker's default ad type or the Random ad type if no Linker info is specified in the API call.

To simplify UI design, we recommend that developers utilizing the Adjix API omit the 'at' parameter and note to their users that the user's own Linker's default ad type (ad category) will be associated with their links when shortened via the Adjix API. Linkers can set their default ad type (ad category) in their Linker profile.

Sample request with no Linker info and no specified ad type (now depricated)
http://api.adjix.com/shrinkLink?
url=http%3A//twitter.com/guykawasaki/statuses/893814052


Sample request with Linker info (partner ID) and Business ad type (at=4)
http://api.adjix.com/shrinkLink?
url=http%3A//twitter.com/guykawasaki/statuses/893814052&
partnerID=1628149986706079450&
at=4


Sample request with Linker info (e-mail login ID) and No Ad (redirect) at=0
http://api.adjix.com/shrinkLink?
url=http%3A//twitter.com/guykawasaki/statuses/893814052&
partnerEmail=jimsmith%40mac.com&
at=0


Recommended method: Sample request with Linker info (partner ID) and no specified ad type (uses Linker default ad type)
http://api.adjix.com/shrinkLink?
url=http%3A//twitter.com/guykawasaki/statuses/893814052&
partnerID=1628149986706079450


Sample response
http://adjix.com/fdvx



Ultra-short link (ad.vu)
To create an even shorter link, called ultra-short, you can set
ultraShort=y | yes | true
which returns:
http://ad.vu/fdvx



Link token for our DNS partners
If you have configured your DNS to point to our servers as outlined in our DNS Tips then you can simply request the Adjix link token, noted in green, below, instead of the entire link.
http://adjix.com/fnrh ← Adjix link token

To request only the link token for a URL set tokenOnly=y | yes | true in your request.

Sample link token request using partner ID
http://api.adjix.com/shrinkLink?
url=http%3A//twitter.com/guykawasaki/statuses/893814052&
partnerID=1628149986706079450&
tokenOnly=yes

Sample response
fdvx



Request keys are case sensitive. Only the url key is required. The partnerID, partnerEmail, ultraShort, tokenOnly, and at keys are optional. Omitting the url key will result in a response with a status code of 400.

All responses have Content-Type set to text/plain.