FileLu API
Where can I find my API key?
Go to https://filelu.com/account/, then find API Key and switch it ON.Keys limited to a folder
On the same page you can also make extra keys with Make a key. For each key you choose what it may do (read, download, write, delete, share) and, if you like, limit it to one folder. A key limited to a folder sees only that folder: give itsfld_id (or the fld_id of a folder inside it) in the requests below, because the top level is refused.
An upload that names no folder goes into the folder of the key.
Account
GET Request
curl https://filelu.com/api/account/info?key=YOUR_API_KEY
POST Request
curl -X POST 'https://filelu.com/api/account/info' -d 'key=YOUR_API_KEY'
Response
{
"msg": "OK",
"result": {
"email": "[email protected]",
"storage_used": null,
"premium_expire": "2022-02-18 11:16:07",
"storage_left": "inf"
},
"status": 200,
"server_time": "2021-10-22 04:51:54"
}
Upload
Request
curl https://filelu.com/api/upload/server?key=YOUR_API_KEY
Response
{
"status": 200,
"sess_id": "3rewps03u5ipbkm9",
"result": "http://23.filelu.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 "[email protected]" UPLOAD_URL
Upload into a folder (optional)
Without a folder the file goes into the top level. To choose the folder add one of these form fields:
to_folder- the ID of the folder (from/api/folder/listor/api/folder/create)fld_path- the path from the top, names only, for example/Photos/2026(folders that do not exist yet are made)
curl -F "sess_id=SESS_ID" -F "utype=prem" -F "to_folder=12345" -F "[email protected]" UPLOAD_URL
curl -F "sess_id=SESS_ID" -F "utype=prem" -F "fld_path=/Photos/2026" -F "[email protected]" UPLOAD_URL
fld_id; use to_folder.
A key limited to a folder can only upload into that folder (or a folder inside it).
Response
[
{
"file_code": "b578rni0e1ka",
"file_status": "OK"
}
]
Resulting File URL
https://filelu.com/b578rni0e1ka
Request
curl 'https://filelu.com/api/upload/url?key=YOUR_API_KEY&url=https://domain.com/samplevideofile.mp4&fld_id=0'
fld_id is the ID of the folder the file goes into (0 or left out = the top level).
The request only puts the download in a queue: the file shows up in the folder after FileLu has fetched it, which can take
a few minutes for a big file. Follow it with /api/file/status below.
Response
{
"status": 200,
"msg": "OK",
"result": {
"filecode": "b578rni0e1ka"
},
"server_time": "2021-10-22 05:13:21"
}
Resulting File URL
https://filelu.com/b578rni0e1ka
Request
curl https://filelu.com/api/file/status?key=YOUR_API_KEY
Response
{
"status": 200,
"server_time": "2024-09-18 16:25:39",
"msg": "OK",
"result": {
"total_size": "0.0 GB",
"url_count": 0,
"percent": "0%",
"speed": "0 MB/s"
}
}
Download
Request
curl -X POST 'https://filelu.com/api/file/direct_link' -d 'file_code=b578rni0e1ka&key=YOUR_API_KEY'
Response
{
"status": 200,
"server_time": "2021-10-22 05:26:00",
"result": {
"url": "http://23.filelu.com/cgi-bin/dl.cgi/xuf4jzopi4mcmhtdbuwuyepms65d5s7fhhmzjdrhk6z2hoeqihdyqli/1mb.bin",
"size": 1048576
},
"msg": "OK"
}
File Management
Request
curl https://filelu.com/api/file/info?file_code=b578rni0e1ka&key=YOUR_API_KEY
Response
{
"status": 200,
"server_time": "2022-03-09 10:23:03",
"result": [
{
"filecode": "b578rni0e1ka",
"name": "1mb.bin",
"status": 200,
"size": 1048576,
"uploaded": "2022-03-09 10:20:52",
"thumbnail": "https://filelu.com/images/icon/html-dist.png",
"hash": "SLDsdflksdjffkDFDSkldf38fdjlkf",
"downloads": 0
}
],
"msg": "OK"
}
Request
curl https://filelu.com/api/file/list?page=1&per_page=25&fld_id=0&key=YOUR_API_KEY
Response
{
"msg": "OK",
"result": {
"files": [
{
"name": "1mb.bin",
"file_code": "b578rni0e1ka",
"downloads": 0,
"thumbnail": "https://filelu.com/images/icon/html-dist.png",
"public": 1,
"size": 5789,
"link": "https://filelu.com/b578rni0e1ka/1mb.bin.html",
"fld_id": 0,
"hash": "SLDsdflksdjffkDFDSkldf38fdjlkf",
"uploaded": "2022-03-09 10:20:52"
}
],
"results_total": 7,
"results": 7
}
}
Request
curl https://filelu.com/api/file/rename?file_code=b578rni0e1ka&name=newname.bin&key=YOUR_API_KEY
Response
{
"status": 200,
"result": "true",
"msg": "OK",
"server_time": "2022-03-09 10:46:14"
}
Request
curl https://filelu.com/api/file/clone?file_code=b578rni0e1ka&key=YOUR_API_KEY
Response
{
"status": 200,
"result": {
"url": "https://filelu.com/r9o25tsq86ru",
"filecode": "r9o25tsq86ru"
},
"msg": "OK",
"server_time": "2022-03-09 10:49:48"
}
Request
curl https://filelu.com/api/file/set_folder?file_code=b578rni0e1ka&fld_id=15&key=YOUR_API_KEY
Response
{
"server_time": "2022-03-09 11:26:22",
"msg": "OK",
"status": 200
}
Request
curl https://filelu.com/api/file/only_me?file_code=dsedrni0e1ka&only_me=0&key=YOUR_API_KEY
Value
0 => Sharing
1 => Only Me
Response
{
"server_time": "2022-03-09 11:26:22",
"msg": "OK",
"status": 200
}
Set Password Request
curl https://filelu.com/api/file/set_password?file_code=dsedrni0e1ka&key=YOUR_API_KEY&file_password=123456
Set Password Response
{"status":200,"msg":"password set","server_time":"2025-02-03 05:29:02"}
Unset Password Request
curl https://filelu.com/api/file/set_password?file_code=dsedrni0e1ka&key=YOUR_API_KEY&file_password=
Unset Password Response
{"status":200,"msg":"password unset","server_time":"2025-02-03 05:29:02"}
Remove
curl https://filelu.com/api/file/remove?file_code=b578rni0e1ka&remove=1&key=YOUR_API_KEY
Restore
curl https://filelu.com/api/file/restore?file_code=b578rni0e1ka&restore=1&key=YOUR_API_KEY
Request
curl https://filelu.com/api/files/deleted?key=YOUR_API_KEY
Response
{
"status": 200,
"msg": "OK",
"result": [
{
"deleted_ago_sec": 4,
"deleted": "2022-03-09 11:41:58",
"file_code": "ym7e86b6sap4",
"name": "newname.bin"
}
],
"server_time": "2022-03-09 11:42:02"
}
Folder Management
Request
curl https://filelu.com/api/folder/list?page=1&per_page=25&fld_id=0&key=YOUR_API_KEY
Response
{
"status": 200,
"msg": "OK",
"result": {
"files": [
{
"fld_id": 0,
"link": "https://filelu.com/b578rni0e1ka",
"file_code": "b578rni0e1ka",
"uploaded": "2022-03-09 10:49:51",
"name": "1mb.bin"
}
],
"folders": [
{
"fld_id": 15,
"code": null,
"name": "folder1"
}
]
},
"server_time": "2022-03-09 11:31:52"
}
Request
curl https://filelu.com/api/folder/create?parent_id=0&name=newfolder&key=YOUR_API_KEY
Response
{
"status": 200,
"msg": "OK",
"result": {
"fld_id": 52
},
"server_time": "2022-03-09 11:37:35"
}
Request
curl https://filelu.com/api/folder/move?fld_id=12345&dest_fld_id=376421&key=YOUR_API_KEY
Response
{
"status": 200,
"msg": "OK",
"result": {
"fld_id": 52
},
"server_time": "2022-03-09 11:37:35"
}
Request
curl https://filelu.com/api/folder/copy?fld_id=12345&key=YOUR_API_KEY
Response
{
"status": 200,
"msg": "Folder copied successfully",
"result": {
"fld_id": "39032457",
"name": "AAA-copy"
},
"server_time": "2025-02-11 19:59:58"
}
Delete Folder
curl https://filelu.com/api/folder/delete?fld_id=12345&key=YOUR_API_KEY
Restore Folder
curl https://filelu.com/api/folder/restore?fld_id=12345&key=YOUR_API_KEY
Response
{
"status": 200,
"msg": "OK",
"result": "true",
"server_time": "YYYY-MM-DD HH:MM:SS"
}
Request
curl https://filelu.com/api/folder/rename?fld_id=15&name=newname&key=YOUR_API_KEY
Response
{
"status": 200,
"msg": "OK",
"result": "true",
"server_time": "2022-03-09 11:39:29"
}
Set Password
curl https://filelu.com/api/folder/set_password?fld_token=nht5bygizgfij2kjy0mhvkdw74vmvfrl&key=YOUR_API_KEY&fld_password=123456
Unset Password
curl https://filelu.com/api/folder/set_password?fld_token=nht5bygizgfij2kjy0mhvkdw74vmvfrl&key=YOUR_API_KEY&fld_password=
Response
{"status":200,"msg":"password set","server_time":"2025-02-03 05:29:02"}
Request
curl https://filelu.com/api/folder/setting?fld_id=15&filedrop=0&fld_public=0&key=YOUR_API_KEY
Value
0 => OFF
1 => ON
Response
{
"status": 200,
"msg": "OK",
"result": "true",
"server_time": "2022-03-09 11:39:29"
}
Overview
Trusted by 146,000+ users worldwide.
Secure, scalable cloud storage with the tools, apps and encryption you need, and no hidden fees. Start free and grow to a petabyte.