API

RESTful API Akari

To get an API key sign up for an account.

Akari face

Shorten a URL
Methods: Post/Get

API Endpoint: https://api.waa.ai/shorten

KeyRequiredTypeDescription
urlrequiredstringA URL
customoptionalstringCustom URL value between 5-30 characters
privateoptionalstring1 or true
callbackoptionalstringCallback for JSONP
keyoptionalstringAPI key for your account. The shortened link will be added your user account.

Example Request:
https://api.waa.ai/shorten?url=http://dalian.7thstyle.com/2014/11/sora-no-method-ep-7-seventhstyle-001.jpg

Example Response:

{
"data" : {
"url"          :  "https:\/\/waa.ai\/4iLm.jpg",
"short_code"   :  "4iLm",
"extension"    :  "jpg"
},
"success"  :  true,
"status"   :  200
}

Imgur Logo

Upload to Imgur and shorten link
Methods: Post/Get

API Endpoint: https://api.waa.ai/imgur

KeyRequiredTypeDescription
imagerequiredmixedA binary file or a URL for an image
custom optional string Custom URL value between 5-30 characters
private optional string 1 or true
callback optional string Callback for JSONP
key optional string API key for your account. The shortened link will be added your user account.

Example Request:
https://api.waa.ai/imgur?image=http://dalian.7thstyle.com/2014/10/gochiusa-blu-ray-vol-6-cover-art-seventhstyle-001.jpg

Example Response:

{
"data" : {
"url"          :  "https:\/\/waa.ai\/41gE.jpg",
"short_code"   :  "41gE",
"extension"    :  "jpg"
},
"success"  :  true,
"status"   :  200
}


A quick note

By default, using the API to upload an image to Imgur will strip all EXIF/metadata from the image. The image is uploaded anonymously and not linked to any account.


Akari face

URL Info
Method: Get

API Endpoint: https://api.waa.ai/info/{short_code}

KeyRequiredTypeDescription
short_coderequiredstringURL short code
callbackoptionalstringCallback for JSONP

Example Request:
https://api.waa.ai/info/Le

Example Response:

{
"data" : {
"short_code"     :  "Le",
"long_url"       :  "http:\/\/yuruyuri.com",
"date_created"   :  "2012-08-17",
"last_visited"   :  "2014-08-26 08:02:54",
"clicks"         :  99,
"extension"      :  false,
"link"           :  "https:\/\/waa.ai\/Le"
},
"success"  :  true,
"status"   :  200
}

Akari face

Delete a URL
Method: Get

API Endpoint: https://api.waa.ai/delete/{short_code}/{delete_hash}

KeyRequiredTypeDescription
short_coderequiredstringURL short code
delete_hashrequiredstringDelete hash for the short code.
callbackoptionalstringCallback for JSONP

Example Request:
https://api.waa.ai/delete/v3rB/MGI2NmEzYzkwZDZ

Example Response:

{
"data" : {
"message"   :  "This link has been successfully deleted.",
},
"success"  :  true,
"status"   :  200
}

Tweetbot Logo

Tweetbot

It's possible to use the Akari Link Shortener as a custom image upload service in Tweetbot for iOS and Mac.

How to set waa.ai as the custom image upload:
  1. Open Settings
  2. Select "Account Settings"
  3. Select "Image Upload"
  4. Select "Custom" and enter the following value: https://api.waa.ai/imgur

Akari!