KenFiles API Developer

Welcome to the KenFiles API! We hope that it will prove useful to developers who are interested in integrating KenFiles support into their applications.

Account
----- Request -----
$ curl https://kenfiles.com/api/account/info?key=API_KEY
----- Response -----
{
    "msg": "OK",
    "result": {
        "email": "you@domain.com",
        "balance": "0.04900",
        "storage_used": null,
        "premium_expire": "2022-02-18 11:16:07",
        "storage_left": "inf"
    },
    "status": 200,
    "server_time": "2021-10-22 04:51:54"
}
----- Request -----
$ curl https://kenfiles.com/api/account/stats?key=API_KEY
----- Response -----
{
    "msg": "OK",
    "result": [
        {
            "downloads": "0",
            "sales": "0",
            "profit_sales": "0.00000",
            "profit_refs": "0.00000",
            "profit_site": "0.00000",
            "views": "0",
            "refs": "0",
            "profit_total": "0.00000",
        }
    ]
    "status": 200,
    "server_time": "2021-10-22 04:55:33",
}
Upload
----- Request -----
$ curl https://kenfiles.com/api/upload/server?key=API_KEY
----- Response -----
{
    "status": 200,
    "sess_id": "3rewps03u5ipbkm9",
    "result": "http://s1.fileserverdomain.com/cgi-bin/upload.cgi",
    "msg": "OK",
    "server_time": "2021-10-22 05:13:21"
}
----- Request -----
$ curl -F "sess_id=SESS_ID" -F "utype=prem" -F "file_0=@100mb.bin" UPLOAD_URL
----- Response -----
[
    {
        "file_code": "b578rni0e1ka",
        "file_status": "OK"
    }
]
----- Resulting file URL -----
https://kenfiles.com/b578rni0e1ka
----- Request -----
$ curl 'https://kenfiles.com/api/upload/url?key=key&url=http://domain.com/1mb.bin&fld_id=0'
----- Response -----
[
    {
        "file_code": "b578rni0e1ka",
    }
]
----- Resulting file URL (after upload completes) -----
https://kenfiles.com/b578rni0e1ka
----- Request -----
$ curl 'https://kenfiles.com/api/upload/url?key=API_KEY&file_code=b578rni0e1ka'
----- Response -----
[
    {
        "file_code": "b578rni0e1ka",
    }
]
Download
----- Request -----
$ curl https://kenfiles.com/api/file/direct_link?file_code=b578rni0e1ka&key=key
----- Response -----
{
    "status": 200,
    "server_time": "2021-10-22 05:26:00",
    "result": {
        "url": "http://s1.fileserverdomain.com/cgi-bin/dl.cgi/xuf4jzopi4mcmhtdbuwuyepms65d5s7fhhmzjdrhk6z2hoeqihdyqli/1mb.bin",
        "size": 1048576
    },
    "msg": "OK"
}
Reseller v3
----- Request -----
$ curl https://kenfiles.com/api/reseller/create?key=API_KEY&t=PLAN
----- Response -----
{
    "server_time": "2023-12-12 12:29:29",
    "voucher": "9999wqadi4xp88888p",
    "status": 200
}
----- Parameters -----
PLAN = This is the plan of the voucher. Possible values include:
* Premium:30p90p180p365p
* Premium Pro: 30b90b180b365b
* Premium Traffic: 50t200t500t2000t
API_KEY_V3 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Obtainable at "Account Settings")