Upload file to KrakenFiles.com

Each file upload must be followed through the full 2 steps below.

To upload files on our server, first get a available and less used server.

REQUEST URL http://hs4.krakencloud.net/api/server/available
METHOD GET
FORM ENCODING application/json
Example request
curl http://hs4.krakencloud.net/api/server/available
   -H "Accept: application/json"
Example correct response http code: 200
{
    "status": 200,
    "data": {
        "url": "https:\/\/ups123.krakenfiles.com\/uploader\/api\/file",
        "serverAccessToken": "UDUGhqdPSzTb0gHLtc"
    }
}
Example error response http code: 500
{
    "status": 500,
    "data": {
        "message": "No available servers to upload file. Try again later"
    }
}

Important: To upload multiple files, you have to call /api/server/available each time for new serverAccessToken

REQUEST URL https://ups123.krakenfiles.com/uploader/api/file
url received from /api/server/available
METHOD POST
ENCODING multipart/form-data
HEADERS
Name Example value Description Required
X-AUTH-TOKEN kj!ng%DGffd$49SFn Your private api token, generated in account setting NO
* Attach your private api token only when if you want to upload file on your account
PARAMS
Name Example value Description Required
file - File to upload YES
serverAccessToken UDUGhqdPSzTb0gHLtc Token received from /api/server/available YES
folderId s#&dV@#Ia2b5cRh Folder where file will be placed. Get list NO
premiumOnly false Set download access only for Premium users NO
hideStats false Hide stats before users NO
disableDownload false Disable file download NO
Example request
curl X POST https://ups123.krakenfiles.com/uploader/api/file
   -H "X-AUTH-TOKEN: kj!ng%DGffd$49SFn"
   -F 'serverAccessToken=UDUGhqdPSzTb0gHLtc'
   -F 'file=@file.zip'
   -F 'folderId=s#&dV@#Ia2b5cRh'
   -F 'premiumOnly=true'
Example correct response http code: 200
{
    "status": 200,
    "data": {
        "url": "https:\/\/krakenfiles.com\/view\/45A55526de\/file.html",
        "hash": "45A55526de",
        "title": "file.zip",
        "size": 234372034,
        "folderId": "s#&dV@#Ia2b5cRh"
    }
}
Example error response http code: 500
{
    "status": 500,
    "data": {
        "message": "serverAccessToken has already been used"
    }
}