Api referenceFiles
Delete File
Delete a file from RenderIO storage and mark it as deleted.
Delete File
DELETE /api/v1/files/:fileIdDelete a file from R2 storage and mark it as deleted. This permanently removes the file data. The file metadata record is preserved but marked with is_deleted: true and its storage_url will no longer be accessible.
Authentication
Requires API key via X-API-KEY header.
Request
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-KEY | string | Yes | Your API key with ffsk_ prefix |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The unique identifier of the file to delete. |
Response
200 OK
{
deleted: true;
file_id: string;
}| Field | Type | Description |
|---|---|---|
deleted | boolean | Always true on success. |
file_id | string | The ID of the deleted file. |
Error responses
| Status | Error | Description |
|---|---|---|
401 | UNAUTHORIZED | Missing or invalid API key. |
404 | NOT_FOUND | No file found with the given ID, the file belongs to a different account, or the file has already been deleted. |
429 | RATE_LIMITED | Too many requests. Retry after the period indicated in the Retry-After header. |
Examples
curl
curl -X DELETE https://renderio.dev/api/v1/files/f1a2b3c4-d5e6-7890-abcd-ef1234567890 \
-H "X-API-KEY: ffsk_your_api_key_here"JavaScript (fetch)
const fileId = "f1a2b3c4-d5e6-7890-abcd-ef1234567890";
const response = await fetch(
`https://renderio.dev/api/v1/files/${fileId}`,
{
method: "DELETE",
headers: {
"X-API-KEY": "ffsk_your_api_key_here",
},
},
);
const { deleted, file_id } = await response.json();
console.log(`Deleted file ${file_id}: ${deleted}`);Python (requests)
import requests
file_id = "f1a2b3c4-d5e6-7890-abcd-ef1234567890"
response = requests.delete(
f"https://renderio.dev/api/v1/files/{file_id}",
headers={
"X-API-KEY": "ffsk_your_api_key_here",
},
)
data = response.json()
print(f"Deleted file {data['file_id']}: {data['deleted']}")