Complete REST API reference for integrating VStorage into your applications.
This is API documentation for our planned VStorage API. The API endpoints shown here represent our intended functionality and will be available when we launch our full service. Currently, this is documentation only - the actual API endpoints are not yet live.
https://api.vstorage.ch/v1
All API requests require authentication using a Bearer token in the Authorization header.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.vstorage.ch/v1/files
Generate your API key from the dashboard settings.
1000 requests per hour per API key.
Retrieve a list of files in your account.
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.vstorage.ch/v1/files?limit=50&offset=0"
Parameter | Type | Description |
---|---|---|
limit | integer | Number of files to return (max 100) |
offset | integer | Number of files to skip |
tags | string | Filter by tags (comma-separated) |
Upload a new file to your account.
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "name=My Document" \
-F "tags=work,important" \
https://api.vstorage.ch/v1/files/upload
Field | Type | Required | Description |
---|---|---|---|
file | file | Yes | The file to upload |
name | string | No | Custom name for the file |
tags | string | No | Comma-separated tags |
Download a file by its ID.
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.vstorage.ch/v1/files/123/download" \
-o downloaded_file.pdf
Create a secure share link for a file.
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"permissions": ["read"],
"expires_at": "2024-12-31T23:59:59Z",
"password": "optional_password"
}' \
https://api.vstorage.ch/v1/files/123/share
Field | Type | Required | Description |
---|---|---|---|
permissions | array | Yes | Array of permissions: ["read", "download"] |
expires_at | string | No | ISO 8601 timestamp when link expires |
password | string | No | Optional password protection |
{
"success": true,
"data": {
"id": "123",
"name": "document.pdf",
"size": 1024000,
"mime_type": "application/pdf",
"created_at": "2024-01-15T10:30:00Z",
"tags": ["work", "important"],
"download_url": "https://api.vstorage.ch/v1/files/123/download"
}
}
{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid or expired",
"details": {}
}
}
We provide official SDKs for popular programming languages to make integration easier.