NAV
cURL HTTPie


  Legal
  Privacy
  About

apiJack

Introduction

apiJack is an API made to solve your problems faster. We have made a lot of functionality which is accessible through one API key and signup is easy. It is a faster, cheaper and simpler solution to your problems All examples uses the command line tool cURL or httpie ( https://httpie.org ) to show how the API works. Please use this or infer the API calls from the examples. All APIs are POST with JSON unless otherwise specified

When you sign-up, you will get a key that you can use to do API calls. In all examples, the “yourkey” key is used just as a sample and you should use your own API key while doing API calls. You can see your own key(s) on https://app.apijack.com/app/controlpanel/keys.

apiJack provides you flexibility by supporting both parameter, bearer tokens, and inside json as seen in the examples.

Example of using apiJack with a key parameter

curl -d "{}" https://api.apijack.com/test?key=yourkey
http -b POST https://api.apijack.com/test?key=yourkey

Example of using apiJack with a bearer token

curl -d "{}" \
    https://api.apijack.com/test \
    -H "Authorization: Bearer yourkey" 
http -b POST \
    https://api.apijack.com/test \
    "Authorization: Bearer yourkey" 

Example of using apiJack with JSON

curl -d '{"key":"yourkey"}' https://api.apijack.com/test 
http -b POST https://api.apijack.com/test key=yourkey

To see if everything works with your account and key you can use our free test API, more information on test api.

Credit System

Each request requires a certain amount of credits. You can see your credits in the dashboard using the following link. https://app.apijack.com/app/controlpanel/dashboard.

When you sign-up, you get 5,000 free credits as a starter. However, after you have consumed your initial credits, You can refill your credits in the refill tab https://app.apijack.com/app/controlpanel/refill.

Error Messages

An API can fail for different reasons. Each API shows what error can result, but there are also standard error messages.

Standard Error Messages:

Standard Error Messages can occur to any API call.

MessageDescription
insufficient_fundsYou are out of credits and need to refill to continue.
internal_serverIf an unexpected event happens we will be notified and contact you shortly.
invalid_keyYou forgot to send a key or the key is invalid or not functioning. Maybe you did not apply the key correctly with your library?
not_foundYou called an API endpoint that does not exist. Maybe you spelled it wrong or used a wrong HTTP Method?
invalid_jsonWhen the endpoint expects JSON and it is invalid JSON
missing_fieldYou didn’t send all required fields with. See JSON output message for more info.
invalid_methodFor that API POST requests only supported

/api/test

To see if everything works with your key and you have sufficient balance, you can use the following free test API:

Parameters

There are No parameters required for this endpoint.

Sample Request

curl -d '{"key":"yourkey"}' https://api.apijack.com/test 
http -b POST https://api.apijack.com/test key=yourkey

Sample Response

{"error": null}
{
    "error": null
}

Errors

The API can return the standard errors in section Error Messages

Payment Structure

API calls are free.

/api/balance

This endpoint returns your current balance in your ApiJack account.

Parameters

There are No parameters required for this endpoint. The request is sent using the GET HTTP method.

Sample Request

curl -d '{"key":"yourkey"}' https://api.apijack.com/balance 
http -b POST https://api.apijack.com/balance key=yourkey

Sample Response

{"error": null, "available": 5000}
{
    "available": 5000, 
    "error": null
}

Errors

The API can return the standard errors in section Error Messages

Payment Structure

API calls are free.

/api/qr-maker

This endpoint makes a standard QR image of a text.

Parameters

Parameters are in JSON format and sent using POST method.

NameRequiredTypeDescription
textYesStringThe QR code’s engraned text
expireNoIntegerDays until the expire (default 365 a year)

Sample Request - Save a QR image with the text “Hello Jack” for 24 hours

curl -d \
    '{"key":"yourkey", "text":"Hello Jack", "expire":24 }' \
    https://api.apijack.com/qr-maker 
http -b POST https://api.apijack.com/qr-maker \
    key=yourkey text="Hello Jack" expire:=24

Sample Response

{"error": null, "link": "https://udata.apijack.com/29177987-9fcd-4bf9-b305-2dae45bfb88c.png"}
{
    "error": null,
    "link": "https://udata.apijack.com/29177987-9fcd-4bf9-b305-2dae45bfb88c.png"
}

The link is a reference to the QR image of “Hello Jack”

Error Messages

Only standard error messages can occur. See the standard errors described under Standard Errors in Error Messages

Payment Structure

5 credits per year rounded up

/api/myip

This endpoint returns your public ip.

Parameters

There are No parameters required for this endpoint. However the request is sent using the POST HTTP method.

Sample Request

curl -d '{"key":"yourkey"}' https://api.apijack.com/myip 
http -b POST https://api.apijack.com/myip key=yourkey

Sample Response

{"error": null, "ip": "42.42.42.42"}
{
    "error": null,
    "ip": "42.42.42.42"
}

Error Messages

The API can return the standard errors in section Error Messages

Payment Structure

API call costs 10 credits.

/api/suuid

Makes an unique sentence that can be used as a UUID. The sentences are guaranteed to be unique for the next 27 years.

Sample Request

curl -d '{"key":"yourkey"}' https://api.apijack.com/suuid 
http -b POST https://api.apijack.com/suuid key=yourkey

Sample Response

{"suuid": "meaty-fishhead", "error": null}
{
    "error": null, 
    "suuid": "meaty-fishhead"
}

Error Messages

The API can return the standard errors in section Error Messages

Payment Structure

API calls costs 30 credits.

/api/translate

Translate sentences easily using Google Translate. Soon we will add the possibility to also use Bing, Yandex etc..

Api call

POST on https://api.apijack.com/translate using the folliwng JSON arguments:

ParameterObligatoryTypeDescription
textYesStringThe text you want to translate
sourceYesStringThe language source of the text - this have to be one of following: af, sq, ar, be, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en, et, tl, fi, fr, gl, de, el, iw, hi, hu, is, id, ga, it, ja, ko, lv, lt, mk, ms, mt, no, fa, pl, pt, ro, ru, sr, sk, sl, es, sw, sv, th, tr, uk, vi, cy, yi
targetYesStringThe language target you want to translate to - this have have to be one of following: af, sq, ar, be, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en, et, tl, fi, fr, gl, de, el, iw, hi, hu, is, id, ga, it, ja, ko, lv, lt, mk, ms, mt, no, fa, pl, pt, ro, ru, sr, sk, sl, es, sw, sv, th, tr, uk, vi, cy, yi

Sample Request - Translate “Hello my friend” from English to Danish

curl -d '{"key":"yourkey",
          "text":"Hello my friend",
          "source": "en",
          "target": "da"}' https://api.apijack.com/translate 
http -b POST https://api.apijack.com/translate \
    text="Hello my friend" \
    target=da \
    source=en \
    key=yourkey

Sample Response

{"error": null, "original": "Hello my friend", "translation": "Hej min ven"}
{
    "error": null,
    "original": "Hello my friend",
    "translation": "Hej min ven"
}

Error Messages

Only standard errors described under Standard Errors in Error Messages can occur.

Payment Structure

API calls costs 0.5 credit per character rounded up to nearest integer.