API Documentation
Authentication
Include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEYRate Limits
Each API key is limited to 1 request every 10 minutes.
Upload Endpoint
POST https://vaulted.zone.id/api/v1/upload
Request Body
{
"name": "Example Upload",
"description": "Optional description",
"url": "https://example.com/file"
}Response
{
"success": true,
"message": "Upload saved successfully",
"data": {
"id": "uuid",
"name": "Example Upload",
"description": "Optional description",
"url": "https://example.com/file",
"created_at": "2024-01-01T00:00:00Z"
}
}Code Examples
Python
import requests
api_key = "YOUR_API_KEY"
url = "https://vaulted.zone.id/api/v1/upload"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
data = {
"name": "My Upload",
"description": "Example file",
"url": "https://example.com/file.pdf"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())JavaScript (Node.js)
const apiKey = "YOUR_API_KEY";
const url = "https://vaulted.zone.id/api/v1/upload";
const data = {
name: "My Upload",
description: "Example file",
url: "https://example.com/file.pdf"
};
fetch(url, {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify(data)
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));cURL
curl -X POST https://vaulted.zone.id/api/v1/upload \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Upload",
"description": "Example file",
"url": "https://example.com/file.pdf"
}'PHP
<?php
$api_key = "YOUR_API_KEY";
$url = "https://vaulted.zone.id/api/v1/upload";
$data = [
"name" => "My Upload",
"description" => "Example file",
"url" => "https://example.com/file.pdf"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer " . $api_key,
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>Error Codes
- 401 - Invalid or missing API key
- 429 - Rate limit exceeded
- 400 - Invalid request body
- 500 - Internal server error
