API Documentation

API Documentation

File Status Check API

Endpoint

GET /api/files

Description

This API endpoint checks if a file is available and returns its information based on the provided URL.

Request Examples

curl -X GET "https://akirabox.com/api/files?url=https://akirabox.com/{id}/file"
import requests

url = "https://akirabox.com/api/files"
params = {
	"url": "https://akirabox.com/{id}/file"
}

response = requests.get(url, params=params)
print(response.json())

$url = 'https://akirabox.com/api/files?url=' . 
	   urlencode('https://akirabox.com/{id}/file');

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
const axios = require('axios');

const checkFile = async () => {
	try {
		const response = await axios.get('https://akirabox.com/api/files', {
			params: {
				url: 'https://akirabox.com/{id}/file'
			}
		});
		
		console.log( response.data);
	} catch (error) {
		if (error.response) {
			console.error('Error:', error.response.data.message);
		} else {
			console.error('Error:', error.message);
		}
	}
};

checkFile();

Response Examples

Successful Response (200)
{
	"status": 200,
	"name": "example.pdf",
	"size": "1.2 MB",
	"type": "file",
	"mime": "application/pdf",
	"url": "https://akirabox.com/{id}/file"
}
Error Response (404)
{
	"status": 404,
	"message": "File not found"
}

List Files API

Endpoint

GET /api/files/list

Description

This API endpoint retrieves a paginated list of files uploaded by the authenticated user. Files are returned in descending order by upload date (most recent first).

Parameters

Parameter Type Required Description
api_key string Yes Your API key (can also use api_token)
page integer No Page number (default: 1)
per_page integer No Number of files per page (default: 10, max: 100)

Request Examples

curl -X GET "https://akirabox.com/api/files/list?api_key=YOUR_API_KEY&page=1&per_page=10"
import requests

url = "https://akirabox.com/api/files/list"
params = {
    "api_key": "YOUR_API_KEY",
    "page": 1,
    "per_page": 10
}

response = requests.get(url, params=params)
print(response.json())
$url = 'https://akirabox.com/api/files/list?' . 
    http_build_query([
        'api_key' => 'YOUR_API_KEY',
        'page' => 1,
        'per_page' => 10
    ]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
const axios = require('axios');

const listFiles = async () => {
    try {
        const response = await axios.get('https://akirabox.com/api/files/list', {
            params: {
                api_key: 'YOUR_API_KEY',
                page: 1,
                per_page: 10
            }
        });
        
        console.log(response.data);
    } catch (error) {
        if (error.response) {
            console.error('Error:', error.response.data.message);
        } else {
            console.error('Error:', error.message);
        }
    }
};

listFiles();

Response Examples

Successful Response (200)
{
    "result": {
        "results": 10,
        "results_total": 1527,
        "files": [
            {
                "file_code": "8ifkke3kwpbc",
                "public": 0,
                "size": 3616623326,
                "downloads": 35,
                "name": "Hytale_2026.01.28_build7_ElEnemigos.rar",
                "link": "https://akirabox.com/8ifkke3kwpbc/file",
                "uploaded": "2026-01-29 22:32:10"
            }
        ]
    },
    "status": 200,
    "server_time": "2026-01-30 18:02:54",
    "msg": "OK"
}
Error Response (401)
{
    "status": 401,
    "message": "Invalid API key"
}
Error Response (400)
{
    "status": 400,
    "message": "API key is required"
}

Response Fields

Result Object
Field Type Description
results integer Number of files in current page
results_total integer Total number of files for the user
files array Array of file objects
File Object
Field Type Description
file_code string Unique file identifier (shared ID)
public integer 1 if public, 0 if private
size integer File size in bytes
downloads integer Number of downloads
name string Full file name with extension
link string Direct download link to the file
uploaded string Upload timestamp (Y-m-d H:i:s format)

File Upload API

Description

This is only for Premium Users

Renew Link API

Endpoint

POST /api/files/{id}/renew-link

Description

This API endpoint allows you to renew the shared link for a file or folder. When you renew a link, a new file entry is created with a new ID (and thus a new share link), while preserving all file data including downloads, views, and other metadata. The old link will no longer work after renewal.

Note: The file must be public (not private) and you must be the owner of the file to renew its link.

Authentication

This endpoint requires authentication using Bearer token in the Authorization header.

Get your API token at API Settings Page

Parameters

Parameter Type Location Required Description
id string URL Path Yes The hashed ID of the file or folder to renew
Authorization string Header Yes Bearer token: Bearer YOUR_API_TOKEN

Request Examples

curl -X POST "https://akirabox.com/api/files/{id}/renew-link" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json"
import requests

url = "https://akirabox.com/api/files/{id}/renew-link"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers, json={})
print(response.json())
$url = 'https://akirabox.com/api/files/{id}/renew-link';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_TOKEN',
    'Accept: application/json',
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
const axios = require('axios');

const renewLink = async () => {
    try {
        const response = await axios.post(
            'https://akirabox.com/api/files/{id}/renew-link',
            {},
            {
                headers: {
                    'Authorization': 'Bearer YOUR_API_TOKEN',
                    'Accept': 'application/json',
                    'Content-Type': 'application/json'
                }
            }
        );
        
        console.log(response.data);
    } catch (error) {
        if (error.response) {
            console.error('Error:', error.response.data.message);
        } else {
            console.error('Error:', error.message);
        }
    }
};

renewLink();

Response Examples

Successful Response (200)
{
    "success": true,
    "message": "Link renewed successfully",
    "data": {
        "id": "new_hashed_id",
        "name": "example.pdf",
        "type": "file",
        "shared_link": "https://akirabox.com/new_hashed_id/file",
        "downloads": 10,
        "view_number": 25
    }
}
Error Response (404)
{
    "success": false,
    "message": "File or folder not found"
}
Error Response (403)
{
    "success": false,
    "message": "You do not have permission to renew this link"
}
Error Response (400)
{
    "success": false,
    "message": "Private files or folders cannot be shared, change the visibility to public before sharing."
}

Response Fields

Success Response Object
Field Type Description
success boolean Indicates if the request was successful
message string Success or error message
data object File information object (only present on success)
Data Object
Field Type Description
id string New hashed ID of the file/folder
name string File or folder name
type string Type: "file" or "folder"
shared_link string New shareable link URL
downloads integer Number of downloads (preserved from old link)
view_number integer Number of views (preserved from old link)

Important Notes

  • The file or folder must be public (not private) to renew the link
  • You must be the owner of the file/folder to renew its link
  • The old link will stop working immediately after renewal
  • All file data (downloads, views, metadata) is preserved in the new link
  • For folders, all children are automatically updated to point to the new folder