REST API

Up-4ever API

Automate uploads and manage your files, folders and account from your own scripts and apps. Simple key auth, JSON everywhere.

Base URLhttps://demo.up-4ever.com/api
Auth?key=YOUR_KEY
FormatJSON

Getting started

Access is approval‑gated. Request a key from your account — tell us what you're building — and once it's approved your key appears under Account → Integrations, ready to use.

  1. Request an API key and describe your use case.
  2. We review it and email you when it's approved.
  3. Copy your key from Account → Integrations and start calling the API.

Authentication

Pass your key on every request, either as a query parameter or a bearer header:

# query parameter
curl "https://demo.up-4ever.com/api/account/info?key=YOUR_KEY"

# or an Authorization header
curl -H "Authorization: Bearer YOUR_KEY" "https://demo.up-4ever.com/api/account/info"

Your key acts on your account only — every call is scoped to your own files. Treat it like a password; if it leaks, revoke it from your account and request a new one.

Response format

Every response is JSON with the same envelope. Data (when any) is under result.

{
  "msg": "OK",
  "status": 200,
  "result": { ... },
  "server_time": "2026-07-03 16:11:09"
}

Scopes

Each key is granted a set of scopes when approved. A call is rejected with 403 if its scope isn't granted.

ScopeGrants
accountRead account info & stats
uploadUpload files (local & remote URL)
downloadGenerate direct download links
files_readList & inspect files
files_writeRename, clone & move files
foldersList, create & rename folders

Rate limits

Each key has a per‑minute request limit set when it's approved. Exceeding it returns 429 Rate limit exceeded — slow down and retry after a moment.

Errors

Errors use the same envelope with a non‑200 status and a human msg.

StatusMeaning
400Bad or missing parameters
401Unauthorized — missing, wrong or expired key
403Access denied — key lacks the required scope
404Resource not found (e.g. no such file)
429Rate limit exceeded
500Server error

Account

GET/api/account/info

Your profile and storage snapshot.

ParamDescription
keyrequiredYour API key
curl "https://demo.up-4ever.com/api/account/info?key=YOUR_KEY"
{
  "msg": "OK", "status": 200, "server_time": "2026-07-03 16:11:09",
  "result": {
    "email": "[email protected]",
    "balance": "10.06540",
    "storage_used": 27113420864,
    "storage_left": "inf",
    "premium_expire": "2027-05-16 19:27:08"
  }
}
GET/api/account/stats

Per‑day downloads, sales and earnings.

ParamDescription
keyrequiredYour API key
lastoptionalNumber of days to include (default 7)
curl "https://demo.up-4ever.com/api/account/stats?key=YOUR_KEY&last=30"
{
  "msg": "OK", "status": 200,
  "result": [
    { "day": "2026-07-03", "downloads": 57, "sales": 0,
      "profit_dl": "0.1700", "profit_sales": "0.0000",
      "profit_total": "0.17000", "uploads": 0 }
  ],
  "server_time": "2026-07-03 16:11:09"
}

Upload

GET/api/upload/server

Step 1. Ask for an upload server and a short‑lived session. You'll POST the file to the returned URL in step 2.

ParamDescription
keyrequiredYour API key (needs the upload scope)
curl "https://demo.up-4ever.com/api/upload/server?key=YOUR_KEY"
{
  "msg": "OK", "status": 200,
  "result": "https://s10.example.com/cgi-bin/upload.cgi",
  "sess_id": "a28p69e2fbpxqlc0",
  "utype": "reg",
  "server_time": "2026-07-03 16:13:40"
}
POSTupload.cgi

Step 2. POST your file (multipart) to the result URL from step 1, using its sess_id. Include ajax=1 to get JSON back.

FieldDescription
sess_idrequiredFrom step 1
ajaxrequiredSet to 1 for a JSON response
file_0requiredThe file to upload
utypeoptionalFrom step 1 (reg / prem)
curl -F "sess_id=SESS_ID" -F "utype=reg" -F "ajax=1" \
     -F "[email protected]" "UPLOAD_URL"
[ { "file_code": "dh1a3wcxwtxp", "file_status": "OK" } ]

The file lands in your account. Its public page is https://demo.up-4ever.com/FILE_CODE.

GET/api/upload/url

Queue a remote upload — we fetch the URL server‑side into your account.

ParamDescription
keyrequiredYour API key (needs upload)
urlrequiredThe http(s) URL to fetch
folderoptionalDestination folder id (default 0 = root)
curl "https://demo.up-4ever.com/api/upload/url?key=YOUR_KEY&url=https://host/file.bin&folder=0"
{ "msg": "WORKING", "status": 200, "server_time": "2026-07-03 16:14:22" }

Check progress by polling with the file code once it appears: ?key=YOUR_KEY&file_code=FILE_CODE.

Files

GET/api/file/info

Details for one or more files.

ParamDescription
keyrequiredYour API key (needs files_read)
file_coderequiredOne code, or several comma‑separated
curl "https://demo.up-4ever.com/api/file/info?key=YOUR_KEY&file_code=abc123,def456"
{ "msg": "OK", "status": 200,
  "result": [
    { "filecode": "abc123", "name": "movie.mp4", "size": 1048576,
      "uploaded": "2026-07-02 21:44:11", "downloads": 0, "status": 200 }
  ] }
GET/api/file/list

Your files, paged and filterable.

ParamDescription
keyrequiredYour API key (needs files_read)
pageoptionalPage number (default 1)
per_pageoptionalItems per page (default 50, max 200)
fld_idoptionalOnly files in this folder
publicoptional1 = public only, 0 = private only
createdoptionalOnly files created on/after this date
nameoptionalFilter by name (substring)
curl "https://demo.up-4ever.com/api/file/list?key=YOUR_KEY&page=1&per_page=20&fld_id=15"
{ "msg": "OK", "status": 200,
  "result": {
    "files": [
      { "name": "movie.mp4", "file_code": "b578rni0e1ka", "size": 5789,
        "public": 1, "downloads": 0, "fld_id": 0,
        "link": "https://demo.up-4ever.com/b578rni0e1ka/movie.mp4.html",
        "uploaded": "2026-07-02 21:44:11" }
    ],
    "results_total": 53806, "results": 1
  } }
GET/api/file/rename

Rename one of your files.

ParamDescription
keyrequiredYour API key (needs files_write)
file_coderequiredThe file code
namerequiredNew file name
curl "https://demo.up-4ever.com/api/file/rename?key=YOUR_KEY&file_code=b578rni0e1ka&name=newname.mp4"
{ "msg": "OK", "status": 200, "result": "true" }
GET/api/file/clone

Create a second link to the same file.

ParamDescription
keyrequiredYour API key (needs files_write)
file_coderequiredThe file code
curl "https://demo.up-4ever.com/api/file/clone?key=YOUR_KEY&file_code=b578rni0e1ka"
{ "msg": "OK", "status": 200,
  "result": { "filecode": "r9o25tsq86ru", "url": "https://demo.up-4ever.com/r9o25tsq86ru" } }
GET/api/file/set_folder

Move one or more files into a folder.

ParamDescription
keyrequiredYour API key (needs files_write)
file_coderequiredOne code, or several comma‑separated
fld_idrequiredDestination folder id (0 = root)
curl "https://demo.up-4ever.com/api/file/set_folder?key=YOUR_KEY&file_code=b578rni0e1ka&fld_id=15"
{ "msg": "OK", "status": 200, "result": {} }
GET/api/files/deleted

Recently trashed files.

ParamDescription
keyrequiredYour API key (needs files_read)
lastoptionalDays to look back (default 30)
curl "https://demo.up-4ever.com/api/files/deleted?key=YOUR_KEY&last=30"
{ "msg": "OK", "status": 200,
  "result": [
    { "file_code": "ym7e86b6sap4", "name": "old.bin",
      "deleted": "2026-07-01 11:41:58", "deleted_ago_sec": 4 }
  ] }
GET/api/files/dmca

Files flagged by a DMCA takedown.

ParamDescription
keyrequiredYour API key (needs files_read)
curl "https://demo.up-4ever.com/api/files/dmca?key=YOUR_KEY"
{ "msg": "OK", "status": 200,
  "result": [ { "file_code": "ym7e86b6sap4", "name": "movie.mp4", "del_time": "2026-06-30 11:41:58" } ] }
POST/api/files/check

Check whether one or more file links exist, and their sizes.

FieldDescription
keyrequiredYour API key (needs files_read)
url_0, url_1 …requiredOne field per URL to check
curl "https://demo.up-4ever.com/api/files/check" \
     -F "key=YOUR_KEY" \
     -F "url_0=https://demo.up-4ever.com/gkths9m7msft/file.mp4"
{ "msg": "OK", "status": 200,
  "result": {
    "https://demo.up-4ever.com/gkths9m7msft/file.mp4": { "found": true, "file_size": 127595568 }
  } }

Folders

GET/api/folder/list

Subfolders and files inside a folder.

ParamDescription
keyrequiredYour API key (needs folders)
fld_idoptionalFolder id (default 0 = root)
curl "https://demo.up-4ever.com/api/folder/list?key=YOUR_KEY&fld_id=0"
{ "msg": "OK", "status": 200,
  "result": {
    "folders": [ { "fld_id": 15, "name": "folder1" } ],
    "files":   [ { "fld_id": 0, "file_code": "b578rni0e1ka", "name": "1mb.bin",
                   "link": "https://demo.up-4ever.com/b578rni0e1ka", "uploaded": "2026-07-02 21:44:11" } ]
  } }
GET/api/folder/create

Create a folder (returns the existing one if the name already exists under the parent).

ParamDescription
keyrequiredYour API key (needs folders)
namerequiredFolder name
parent_idoptionalParent folder id (default 0 = root)
curl "https://demo.up-4ever.com/api/folder/create?key=YOUR_KEY&name=uploads&parent_id=0"
{ "msg": "OK", "status": 200, "result": { "fld_id": 52 } }
GET/api/folder/rename

Rename one of your folders.

ParamDescription
keyrequiredYour API key (needs folders)
fld_idrequiredThe folder id
namerequiredNew folder name
curl "https://demo.up-4ever.com/api/folder/rename?key=YOUR_KEY&fld_id=15&name=newname"
{ "msg": "OK", "status": 200, "result": "true" }