Upload files to your OleUpload account from your own website, software or scripts.
Create an API key in My Account → API Keys, then send it with every request
as ?key=YOUR_KEY or the header Authorization: Bearer YOUR_KEY.
Base URL: https://oleupload.com/uapi/ — every response is JSON with status (200 = OK), msg and result.
Errors: 401/403 key or permission problem, 404 not found, 429 too many requests.
Upload a file
Step 1. Ask for an upload server:
$ curl "https://oleupload.com/uapi/upload/server?key=YOUR_KEY"
{"status":200,"msg":"OK",
"result":"https://fs1.oleupload.com/cgi-bin/upload.cgi?upload_type=file&utype=reg",
"sess_id":"AbCdEf0123456789","max_upload_mb":2048,"expires_in":10800}
Step 2. Send the file to result with the sess_id (optional to_folder = folder id):
$ curl -F "sess_id=SESS_ID" -F "
[email protected]" -F "to_folder=0" "UPLOAD_URL"
[{"file_code":"b578rni0e1ka","file_status":"OK"}]
The file page is https://oleupload.com/b578rni0e1ka. One sess_id can be used for several uploads for 3 hours.
Account
GET /uapi/account/info?key=KEY
→ login, email, premium, premium_expire, files, storage_used, storage_left, max_upload_mb
Files
GET /uapi/file/info?key=KEY&file_code=CODE1,CODE2 (max 50)
GET /uapi/file/list?key=KEY&page=1&per_page=20&fld_id=0 (per_page max 100)
GET /uapi/file/rename?key=KEY&file_code=CODE&name=new_name.zip
GET /uapi/file/delete?key=KEY&file_code=CODE
file: file_code, name, size, downloads, folder_id, public, created, last_download, link
Folders
GET /uapi/folder/list?key=KEY&parent_id=0
GET /uapi/folder/create?key=KEY&name=Programs&parent_id=0 → fld_id
PHP example
<?php
$key = 'YOUR_KEY';
$srv = json_decode(file_get_contents('https://oleupload.com/uapi/upload/server?key=' . $key), true);
if ($srv['status'] != 200) die($srv['msg']);
$ch = curl_init($srv['result']);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => [
'sess_id' => $srv['sess_id'],
'file_0' => new CURLFile('/path/to/setup.exe'),
],
]);
$res = json_decode(curl_exec($ch), true);
echo 'https://oleupload.com/' . $res[0]['file_code'];
Python example
import requests
key = "YOUR_KEY"
srv = requests.get("https://oleupload.com/uapi/upload/server", params={"key": key}).json()
with open("setup.exe", "rb") as fh:
res = requests.post(srv["result"], data={"sess_id": srv["sess_id"]}, files={"file_0": fh}).json()
print("https://oleupload.com/" + res[0]["file_code"])
Limits
Uploads use the limits of your account type (max file size, storage, allowed extensions). Each key has a per-minute request limit.
You can restrict a key to your server IPs, disable or delete it any time from API Keys.