API
Use the UbiqFile API to manage your account, upload files, get direct links, and manage folders programmatically.

Overview

Base URL
https://ubiqfile.com/api
All responses are returned in JSON format. Successful requests typically return:
msg
result
status
server_time

Live Tester

Request Preview
$ curl "https://ubiqfile.com/api/account/info?key=YOUR_API_KEY"
Response Preview
{ "msg": "Click Run to preview a request", "status": 200 }

Authentication

All API requests require your API key. Pass it as key=YOUR_API_KEY in the query string. Keep your API key private and never expose it publicly in frontend code.
Authentication example GET +
https://ubiqfile.com/api/account/info
Parameters
NameRequiredDescription
keyYesYour API key
Examples
$ curl https://ubiqfile.com/api/account/info?key=YOUR_API_KEY
$url = "https://ubiqfile.com/api/account/info?key=YOUR_API_KEY"; $response = file_get_contents($url); echo $response;
import requests r = requests.get("https://ubiqfile.com/api/account/info", params={ "key": "YOUR_API_KEY" }) print(r.text)
fetch("https://ubiqfile.com/api/account/info?key=YOUR_API_KEY") .then(r => r.text()) .then(console.log);

Account

Account Info GET +
https://ubiqfile.com/api/account/info
Parameters
NameRequiredDescription
keyYesYour API key
Request
$ curl https://ubiqfile.com/api/account/info?key=key
$url = "https://ubiqfile.com/api/account/info?key=YOUR_API_KEY"; $response = file_get_contents($url); echo $response;
import requests r = requests.get("https://ubiqfile.com/api/account/info", params={ "key": "YOUR_API_KEY" }) print(r.text)
fetch("https://ubiqfile.com/api/account/info?key=YOUR_API_KEY") .then(r => r.text()) .then(console.log);
Response
{ "msg": "OK", "result": { "email": "you@domain.com", "balance": "0.04900", "storage_used": null, "premium_expire": "2026-05-22 11:16:07", "storage_left": "inf" }, "status": 200, "server_time": "2026-05-22 04:51:54" }
Field notes
FieldDescription
emailAccount email address
balanceCurrent account balance
storage_usedUsed storage value
premium_expirePremium expiration datetime
storage_leftRemaining storage quota

Upload

Step 1: Select upload server GET +
https://ubiqfile.com/api/upload/server
Parameters
NameRequiredDescription
keyYesYour API key
Request
$ curl https://ubiqfile.com/api/upload/server?key=key
Response
{ "status": 200, "sess_id": "3rewps03u5ipbkm9", "result": "http://s1.fileserverdomain.com/cgi-bin/upload.cgi", "msg": "OK", "server_time": "2026-05-22 05:13:21" }

Download

Get your own file direct link GET +
https://ubiqfile.com/api/file/direct_link
Parameters
NameRequiredDescription
file_codeYesFile code
keyYesYour API key
Request
$ curl https://ubiqfile.com/api/file/direct_link?file_code=b578rni0e1ka&key=key
Response
{ "status": 200, "server_time": "2026-05-17 05:26:00", "result": { "url": "http://s1.ubiqfile.com/cgi-bin/dl.cgi/xuf4d5s7fhhmzjdrhk6z2hoeqihdyqli/1mb.bin", "size": 1048576 }, "msg": "OK" }

File Management

File Info GET +
https://ubiqfile.com/api/file/info
Parameters
NameRequiredDescription
file_codeYesFile code
keyYesYour API key
Request
$ curl https://ubiqfile.com/api/file/info?file_code=b578rni0e1ka&key=key
Response
{ "status": 200, "server_time": "2026-05-09 10:23:03", "result": [ { "filecode": "b578rni0e1ka", "name": "1mb.bin", "status": 200, "size": 1048576, "uploaded": "2026-05-09 10:20:52", "downloads": 0 } ], "msg": "OK" }

Folder Management

Folder List GET +
https://ubiqfile.com/api/folder/list
Parameters
NameRequiredDescription
fld_idNoParent folder ID
keyYesYour API key
Request
$ curl https://ubiqfile.com/api/folder/list?fld_id=0&key=key
Response
{ "status": 200, "msg": "OK", "result": { "files": [ { "fld_id": 0, "link": "https://ubiqfile.com/b578rni0e1ka", "file_code": "b578rni0e1ka", "uploaded": "2026-05-09 10:49:51", "name": "1mb.bin" } ], "folders": [ { "fld_id": 15, "code": null, "name": "folder1" } ] }, "server_time": "2026-05-09 11:31:52" }

Error Examples

Below are common error response examples you may receive when the request is invalid or access is denied.
Invalid API key Error +
{ "status": 403, "msg": "ERROR: Invalid API key", "server_time": "2026-03-28 12:00:00" }

Status Codes

StatusMeaning
200Request successful
400Bad request or missing parameter
403Invalid API key or access denied
404Object not found
500Internal server error

Rate Limits

To keep the API stable for all users:
• avoid sending too many requests in parallel
• cache account and file data when possible
• retry failed requests with small delays
• large upload workflows should follow the documented 2-step upload flow