Switch language
v2

Rediafile Cloud API

Developer & Business API Hub for Rediafile Cloud

API Base URL: https://rediafile.com/cloud/api/v2

Quick Start

1

Get a token

Call /authorize with your credentials or API keys to obtain a Bearer token.

2

Include the token

Add Authorization: Bearer <token> to every authenticated request.

3

Make calls

Upload, download, and manage your files and folders through the REST API.

Authentication uses Bearer tokens obtained via /authorize. Tokens expire after 24 hours. Store securely and rotate regularly.

Authentication

POST /authorize Test in Sandbox

Authorize

Obtain a Bearer access token using account credentials or API keys.

Tokens expire after 24 hours. Store securely.

Parameters

NameTypeRequiredDescription
usernamestringoptional
Yes (if not using API keys)
Account username admin
passwordstringoptional
Yes (if not using API keys)
Account password secret123
api_keystringoptional
Yes (if not using username/password)
Public API key pk_live_xxxxxxxx
api_secretstringoptional
Yes (if not using username/password)
Secret API key sk_live_xxxxxxxx
curl -X POST https://rediafile.com/cloud/api/v2/authorize \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "username=admin" \
  -d "password=secret123"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/authorize');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'username' => 'admin',
    'password' => 'secret123',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/authorize', data={
    'username': 'admin',
    'password': 'secret123',
})
print(resp.json())
const res = await fetch('https://rediafile.com/cloud/api/v2/authorize', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({ username: 'admin', password: 'secret123' }),
});
const data = await res.json();

Sample response

{
    "status": "success",
    "data": {
        "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNTg2NDIiLCJpYXQiOjE3MjQ3MjY0MDB9.signature",
        "token_type": "Bearer",
        "expires_in": 86400,
        "account_id": "158642"
    }
}
POST /disable_access_token Test in Sandbox

Disable Access Token

Revoke and invalidate a previously issued access token.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
access_tokenstringrequired
Yes
The token to revoke eyJhbGciOi...
curl -X POST https://rediafile.com/cloud/api/v2/disable_access_token \
  -H "Authorization: Bearer $TOKEN" \
  -d "access_token=eyJhbGciOi..."
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/disable_access_token');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['access_token' => $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/disable_access_token',
    headers={'Authorization': f'Bearer {token}'},
    data={'access_token': token},
)
await fetch('https://rediafile.com/cloud/api/v2/disable_access_token', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ access_token: token }),
});

Sample response

{
    "status": "success",
    "data": {
        "revoked": true,
        "message": "Token has been disabled."
    }
}

Account Endpoints

GET /account/info Test in Sandbox

Account Info

Retrieve detailed information about the authenticated account.

Requires Authorization: Bearer <token>

curl https://rediafile.com/cloud/api/v2/account/info \
  -H "Authorization: Bearer $TOKEN"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/account/info');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.get('https://rediafile.com/cloud/api/v2/account/info',
    headers={'Authorization': f'Bearer {token}'},
)
const res = await fetch('https://rediafile.com/cloud/api/v2/account/info', {
  headers: { 'Authorization': `Bearer ${token}` },
});
const data = await res.json();

Sample response

{
    "status": "success",
    "data": {
        "account_id": "158642",
        "username": "admin",
        "email": "admin@example.com",
        "storage_used": "456.7 GB",
        "storage_limit": "1024 GB",
        "plan": "Business",
        "created_at": "2023-01-15T10:30:00Z"
    }
}
GET /account/package Test in Sandbox

Account Package

Retrieve the current subscription package and quota details.

Requires Authorization: Bearer <token>

curl https://rediafile.com/cloud/api/v2/account/package \
  -H "Authorization: Bearer $TOKEN"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/account/package');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.get('https://rediafile.com/cloud/api/v2/account/package',
    headers={'Authorization': f'Bearer {token}'},
)
const res = await fetch('https://rediafile.com/cloud/api/v2/account/package', {
  headers: { 'Authorization': `Bearer ${token}` },
});
const data = await res.json();

Sample response

{
    "status": "success",
    "data": {
        "package": "Business",
        "max_file_size": "10240 MB",
        "max_storage": "1024 GB",
        "bandwidth_limit": "unlimited",
        "features": [
            "password_folders",
            "temporary_links",
            "api_access"
        ]
    }
}

File Endpoints

POST /file/upload Test in Sandbox

Upload File

Upload a file (up to 10 GB) via multipart/form-data. Returns a short URL.

Requires Authorization: Bearer <token>. Use multipart/form-data.

Parameters

NameTypeRequiredDescription
filefilerequired
Yes
The file to upload (multipart) (binary)
folder_idstringoptional
No
Target folder ID fld_123
curl -X POST https://rediafile.com/cloud/api/v2/file/upload \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@document.pdf"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/upload');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'file' => new CURLFile('/path/to/document.pdf'),
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

with open('document.pdf', 'rb') as f:
    resp = requests.post('https://rediafile.com/cloud/api/v2/file/upload',
        headers={'Authorization': f'Bearer {token}'},
        files={'file': f},
    )
const form = new FormData();
form.append('file', fileInput.files[0]);
const res = await fetch('https://rediafile.com/cloud/api/v2/file/upload', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: form,
});

Sample response

{
    "status": "success",
    "data": [
        {
            "name": "document.pdf",
            "short_url": "2Vv",
            "url": "https://rediafile.com/2Vv",
            "size": "4.5 MB",
            "file_id": "file_84729",
            "created_at": "2024-08-26T12:00:00Z"
        }
    ]
}
GET /file/download Test in Sandbox

Download File

Get a signed temporary download URL for a file via its short URL.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
short_urlstringrequired
Yes
Short URL code of the file 2Vv
curl "https://rediafile.com/cloud/api/v2/file/download?short_url=2Vv" \
  -H "Authorization: Bearer $TOKEN"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/download?short_url=2Vv');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.get('https://rediafile.com/cloud/api/v2/file/download',
    headers={'Authorization': f'Bearer {token}'},
    params={'short_url': '2Vv'},
)
const res = await fetch('https://rediafile.com/cloud/api/v2/file/download?short_url=2Vv', {
  headers: { 'Authorization': `Bearer ${token}` },
});
const data = await res.json();

Sample response

{
    "status": "success",
    "data": {
        "download_url": "https://rediafile.com/2Vv?download_token=abc123def456",
        "expires_at": "2024-08-26T13:00:00Z"
    }
}
POST /file/url_upload_add Test in Sandbox

Remote URL Upload

Queue a file for upload from a remote URL (server-to-server fetch).

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
urlstringrequired
Yes
Remote URL to fetch https://example.com/large-file.zip
curl -X POST https://rediafile.com/cloud/api/v2/file/url_upload_add \
  -H "Authorization: Bearer $TOKEN" \
  -d "url=https://example.com/large-file.zip"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/url_upload_add');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['url' => 'https://example.com/large-file.zip']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/file/url_upload_add',
    headers={'Authorization': f'Bearer {token}'},
    data={'url': 'https://example.com/large-file.zip'},
)
const res = await fetch('https://rediafile.com/cloud/api/v2/file/url_upload_add', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ url: 'https://example.com/large-file.zip' }),
});

Sample response

{
    "status": "success",
    "data": {
        "task_id": "task_4821",
        "status": "queued",
        "message": "URL upload added to queue."
    }
}
GET /file/url_upload_status Test in Sandbox

URL Upload Status

Check the progress of a queued remote URL upload task.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
task_idstringrequired
Yes
Task ID from url_upload_add task_4821
curl "https://rediafile.com/cloud/api/v2/file/url_upload_status?task_id=task_4821" \
  -H "Authorization: Bearer $TOKEN"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/url_upload_status?task_id=task_4821');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.get('https://rediafile.com/cloud/api/v2/file/url_upload_status',
    headers={'Authorization': f'Bearer {token}'},
    params={'task_id': 'task_4821'},
)
const res = await fetch('https://rediafile.com/cloud/api/v2/file/url_upload_status?task_id=task_4821', {
  headers: { 'Authorization': `Bearer ${token}` },
});

Sample response

{
    "status": "success",
    "data": {
        "task_id": "task_4821",
        "status": "completed",
        "progress": 100,
        "file_id": "file_84730",
        "short_url": "9Xk"
    }
}
GET /file/info Test in Sandbox

File Info

Retrieve metadata for a specific file.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
file_idstringrequired
Yes
File ID file_84729
curl "https://rediafile.com/cloud/api/v2/file/info?file_id=file_84729" \
  -H "Authorization: Bearer $TOKEN"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/info?file_id=file_84729');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.get('https://rediafile.com/cloud/api/v2/file/info',
    headers={'Authorization': f'Bearer {token}'},
    params={'file_id': 'file_84729'},
)
const res = await fetch('https://rediafile.com/cloud/api/v2/file/info?file_id=file_84729', {
  headers: { 'Authorization': `Bearer ${token}` },
});

Sample response

{
    "status": "success",
    "data": {
        "file_id": "file_84729",
        "name": "document.pdf",
        "size": "4.5 MB",
        "type": "application/pdf",
        "short_url": "2Vv",
        "folder_id": "fld_root",
        "created_at": "2024-08-26T12:00:00Z"
    }
}
POST /file/edit Test in Sandbox

Edit File

Update file metadata (name, password, expiry).

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
file_idstringrequired
Yes
File ID file_84729
namestringoptional
No
New file name renamed.pdf
passwordstringoptional
No
Password protect the file mypass
curl -X POST https://rediafile.com/cloud/api/v2/file/edit \
  -H "Authorization: Bearer $TOKEN" \
  -d "file_id=file_84729" \
  -d "name=renamed.pdf"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/edit');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['file_id' => 'file_84729', 'name' => 'renamed.pdf']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/file/edit',
    headers={'Authorization': f'Bearer {token}'},
    data={'file_id': 'file_84729', 'name': 'renamed.pdf'},
)
await fetch('https://rediafile.com/cloud/api/v2/file/edit', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ file_id: 'file_84729', name: 'renamed.pdf' }),
});

Sample response

{
    "status": "success",
    "data": {
        "file_id": "file_84729",
        "updated": true,
        "message": "File updated."
    }
}
POST /file/delete Test in Sandbox

Delete File

Permanently delete a file.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
file_idstringrequired
Yes
File ID to delete file_84729
curl -X POST https://rediafile.com/cloud/api/v2/file/delete \
  -H "Authorization: Bearer $TOKEN" \
  -d "file_id=file_84729"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/delete');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['file_id' => 'file_84729']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/file/delete',
    headers={'Authorization': f'Bearer {token}'},
    data={'file_id': 'file_84729'},
)
await fetch('https://rediafile.com/cloud/api/v2/file/delete', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ file_id: 'file_84729' }),
});

Sample response

{
    "status": "success",
    "data": {
        "file_id": "file_84729",
        "deleted": true
    }
}
POST /file/move Test in Sandbox

Move File

Move a file to a different folder.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
file_idstringrequired
Yes
File ID file_84729
folder_idstringrequired
Yes
Destination folder ID fld_123
curl -X POST https://rediafile.com/cloud/api/v2/file/move \
  -H "Authorization: Bearer $TOKEN" \
  -d "file_id=file_84729" \
  -d "folder_id=fld_123"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/move');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['file_id' => 'file_84729', 'folder_id' => 'fld_123']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/file/move',
    headers={'Authorization': f'Bearer {token}'},
    data={'file_id': 'file_84729', 'folder_id': 'fld_123'},
)
await fetch('https://rediafile.com/cloud/api/v2/file/move', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ file_id: 'file_84729', folder_id: 'fld_123' }),
});

Sample response

{
    "status": "success",
    "data": {
        "file_id": "file_84729",
        "moved_to": "fld_123"
    }
}
POST /file/copy Test in Sandbox

Copy File

Create a copy of a file in a specified folder.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
file_idstringrequired
Yes
File ID file_84729
folder_idstringrequired
Yes
Destination folder ID fld_456
curl -X POST https://rediafile.com/cloud/api/v2/file/copy \
  -H "Authorization: Bearer $TOKEN" \
  -d "file_id=file_84729" \
  -d "folder_id=fld_456"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/copy');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['file_id' => 'file_84729', 'folder_id' => 'fld_456']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/file/copy',
    headers={'Authorization': f'Bearer {token}'},
    data={'file_id': 'file_84729', 'folder_id': 'fld_456'},
)
await fetch('https://rediafile.com/cloud/api/v2/file/copy', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ file_id: 'file_84729', folder_id: 'fld_456' }),
});

Sample response

{
    "status": "success",
    "data": {
        "original_id": "file_84729",
        "copy_id": "file_84730",
        "copied_to": "fld_456"
    }
}

Folder Endpoints

POST /folder/create Test in Sandbox

Create Folder

Create a new folder, optionally password-protected.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
folder_namestringrequired
Yes
Name of the new folder My New Folder
parent_idstringoptional
No
Parent folder ID (for nesting) fld_root
passwordstringoptional
No
Password to protect the folder secret
curl -X POST https://rediafile.com/cloud/api/v2/folder/create \
  -H "Authorization: Bearer $TOKEN" \
  -d "folder_name=My New Folder"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/folder/create');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['folder_name' => 'My New Folder']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/folder/create',
    headers={'Authorization': f'Bearer {token}'},
    data={'folder_name': 'My New Folder'},
)
await fetch('https://rediafile.com/cloud/api/v2/folder/create', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ folder_name: 'My New Folder' }),
});

Sample response

{
    "status": "success",
    "data": {
        "folder_id": "fld_482",
        "folder_name": "My New Folder",
        "created_at": "2024-08-26T12:00:00Z"
    }
}
GET /folder/listing Test in Sandbox

List Folder

List files and subfolders inside a folder.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
folder_idstringoptional
No (defaults to root)
Folder ID (root if omitted) fld_root
curl "https://rediafile.com/cloud/api/v2/folder/listing?folder_id=fld_root" \
  -H "Authorization: Bearer $TOKEN"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/folder/listing?folder_id=fld_root');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.get('https://rediafile.com/cloud/api/v2/folder/listing',
    headers={'Authorization': f'Bearer {token}'},
    params={'folder_id': 'fld_root'},
)
const res = await fetch('https://rediafile.com/cloud/api/v2/folder/listing?folder_id=fld_root', {
  headers: { 'Authorization': `Bearer ${token}` },
});
const data = await res.json();

Sample response

{
    "status": "success",
    "data": {
        "folder_id": "fld_root",
        "folders": [
            {
                "folder_id": "fld_123",
                "name": "Documents",
                "file_count": 12
            }
        ],
        "files": [
            {
                "file_id": "file_84729",
                "name": "document.pdf",
                "short_url": "2Vv",
                "size": "4.5 MB"
            }
        ]
    }
}
GET /folder/info Test in Sandbox

Folder Info

Retrieve metadata for a specific folder.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
folder_idstringrequired
Yes
Folder ID fld_123
curl "https://rediafile.com/cloud/api/v2/folder/info?folder_id=fld_123" \
  -H "Authorization: Bearer $TOKEN"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/folder/info?folder_id=fld_123');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.get('https://rediafile.com/cloud/api/v2/folder/info',
    headers={'Authorization': f'Bearer {token}'},
    params={'folder_id': 'fld_123'},
)
const res = await fetch('https://rediafile.com/cloud/api/v2/folder/info?folder_id=fld_123', {
  headers: { 'Authorization': `Bearer ${token}` },
});

Sample response

{
    "status": "success",
    "data": {
        "folder_id": "fld_123",
        "name": "Documents",
        "parent_id": "fld_root",
        "file_count": 12,
        "folder_count": 2,
        "protected": false,
        "created_at": "2024-01-10T09:00:00Z"
    }
}
POST /folder/edit Test in Sandbox

Edit Folder

Update folder metadata (name, password).

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
folder_idstringrequired
Yes
Folder ID fld_123
folder_namestringoptional
No
New folder name Renamed Folder
curl -X POST https://rediafile.com/cloud/api/v2/folder/edit \
  -H "Authorization: Bearer $TOKEN" \
  -d "folder_id=fld_123" \
  -d "folder_name=Renamed Folder"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/folder/edit');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['folder_id' => 'fld_123', 'folder_name' => 'Renamed Folder']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/folder/edit',
    headers={'Authorization': f'Bearer {token}'},
    data={'folder_id': 'fld_123', 'folder_name': 'Renamed Folder'},
)
await fetch('https://rediafile.com/cloud/api/v2/folder/edit', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ folder_id: 'fld_123', folder_name: 'Renamed Folder' }),
});

Sample response

{
    "status": "success",
    "data": {
        "folder_id": "fld_123",
        "updated": true
    }
}
POST /folder/delete Test in Sandbox

Delete Folder

Permanently delete a folder and all its contents.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
folder_idstringrequired
Yes
Folder ID to delete fld_123
curl -X POST https://rediafile.com/cloud/api/v2/folder/delete \
  -H "Authorization: Bearer $TOKEN" \
  -d "folder_id=fld_123"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/folder/delete');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['folder_id' => 'fld_123']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/folder/delete',
    headers={'Authorization': f'Bearer {token}'},
    data={'folder_id': 'fld_123'},
)
await fetch('https://rediafile.com/cloud/api/v2/folder/delete', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ folder_id: 'fld_123' }),
});

Sample response

{
    "status": "success",
    "data": {
        "folder_id": "fld_123",
        "deleted": true
    }
}
POST /folder/move Test in Sandbox

Move Folder

Move a folder to a different parent folder.

Requires Authorization: Bearer <token>

Parameters

NameTypeRequiredDescription
folder_idstringrequired
Yes
Folder ID to move fld_123
parent_idstringrequired
Yes
Destination parent folder ID fld_456
curl -X POST https://rediafile.com/cloud/api/v2/folder/move \
  -H "Authorization: Bearer $TOKEN" \
  -d "folder_id=fld_123" \
  -d "parent_id=fld_456"
<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/folder/move');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['folder_id' => 'fld_123', 'parent_id' => 'fld_456']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/folder/move',
    headers={'Authorization': f'Bearer {token}'},
    data={'folder_id': 'fld_123', 'parent_id': 'fld_456'},
)
await fetch('https://rediafile.com/cloud/api/v2/folder/move', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: new URLSearchParams({ folder_id: 'fld_123', parent_id: 'fld_456' }),
});

Sample response

{
    "status": "success",
    "data": {
        "folder_id": "fld_123",
        "moved_to": "fld_456"
    }
}

HTTP Errors

200
OK
The request succeeded.
400
Bad Request
The request was malformed or missing required parameters.
401
Unauthorized
Authentication failed or the token is invalid/expired.
403
Forbidden
The account lacks permission for this resource.
404
Not Found
The requested file or folder was not found.
429
Too Many Requests
Rate limit exceeded. Retry after the indicated delay.

Best Practices

  • Cache tokens server-side — never expose them to the browser.
  • Use remote URL upload for large files hosted elsewhere.
  • Handle HTTP 429 with exponential backoff.
  • Regenerate temporary sharing links rather than reusing tokens.
  • Watch the X-RateLimit-Remaining header to anticipate limits.