GET /api/files
This API endpoint checks if a file is available and returns its information based on the provided URL.
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();
{
"status": 200,
"name": "example.pdf",
"size": "1.2 MB",
"type": "file",
"mime": "application/pdf",
"url": "https://akirabox.com/{id}/file"
}
{
"status": 404,
"message": "File not found"
}
GET /api/files/list
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).
| 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) |
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();
{
"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"
}
{
"status": 401,
"message": "Invalid API key"
}
{
"status": 400,
"message": "API key is required"
}
| 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 |
| 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) |
This is only for Premium Users
POST /api/files/{id}/renew-link
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.
This endpoint requires authentication using Bearer token in the Authorization header.
Get your API token at API Settings Page
| 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 |
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();
{
"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
}
}
{
"success": false,
"message": "File or folder not found"
}
{
"success": false,
"message": "You do not have permission to renew this link"
}
{
"success": false,
"message": "Private files or folders cannot be shared, change the visibility to public before sharing."
}
| 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) |
| 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) |