Skip to main content

Welcome to Hubsy Cloud API

The Hubsy Cloud API allows you to programmatically upload, download, manage, and share files from your applications. Build custom integrations, automate workflows, and create powerful file management solutions.

Getting Started

1

Get API Key

  1. Log in to your Hubsy Cloud account
  2. Go to Settings → API Keys
  3. Click “Generate New API Key”
  4. Copy and securely store your key
Never expose API keys in client-side code or public repositories.
2

Make Your First Request

Test your API key with a simple request:
curl https://api.hubsy.cloud/v1/user/info \
  -H "Authorization: Bearer YOUR_API_KEY"
3

Explore Endpoints

Check out our endpoint documentation below to see what’s possible.

Base URL

All API requests should be made to:
https://api.hubsy.cloud/v1

Authentication

Hubsy Cloud API uses Bearer token authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Example Request

curl https://api.hubsy.cloud/v1/files \
  -H "Authorization: Bearer sk_live_abc123xyz"

API Key Scopes

Control what your API keys can access:
  • Read: View files and folders
  • Write: Upload and modify files
  • Delete: Remove files and folders
  • Share: Create and manage share links
Create separate API keys for different applications with minimum required permissions.

Rate Limits

To ensure service quality, API requests are rate limited:
PlanRequests per minute
Free60
Pro300
Enterprise1,000

Rate Limit Headers

Response headers indicate your current status:
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 250
X-RateLimit-Reset: 1640995200
When rate limit is exceeded, you’ll receive a 429 Too Many Requests response.

Response Format

All responses are in JSON format:

Success Response

{
  "success": true,
  "data": {
    // Response data
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "invalid_request",
    "message": "The file ID provided is invalid",
    "details": {}
  }
}

Common Error Codes

CodeDescription
invalid_requestRequest is malformed or missing required parameters
authentication_failedInvalid or missing API key
permission_deniedInsufficient permissions for this operation
not_foundResource not found
rate_limit_exceededToo many requests
storage_exceededStorage quota exceeded
file_too_largeFile exceeds size limit

Pagination

List endpoints support pagination:

Request Parameters

  • page: Page number (default: 1)
  • per_page: Items per page (default: 50, max: 100)

Example Request

curl "https://api.hubsy.cloud/v1/files?page=2&per_page=25" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": [...],
  "pagination": {
    "page": 2,
    "per_page": 25,
    "total_items": 150,
    "total_pages": 6
  }
}

Webhooks

Receive real-time notifications for events:

Available Events

  • file.uploaded - New file uploaded
  • file.deleted - File deleted
  • file.shared - File shared
  • share.accessed - Shared file accessed
  • storage.warning - Approaching storage limit

Setup

  1. Go to Settings → Webhooks
  2. Add webhook URL
  3. Select events to monitor
  4. Save configuration

Webhook Documentation

Learn more about webhooks

SDKs & Libraries

Official SDKs for popular languages:

JavaScript/Node.js

npm install @hubsy/sdk

Python

pip install hubsy-cloud

PHP

composer require hubsy/sdk

Ruby

gem install hubsy-cloud
SDKs handle authentication, retries, and error handling automatically.

Quick Examples

Upload a File

const response = await fetch('https://api.hubsy.cloud/v1/files/upload', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: formData
});

List Files

import requests

response = requests.get(
    'https://api.hubsy.cloud/v1/files',
    headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
files = response.json()['data']
curl -X POST https://api.hubsy.cloud/v1/shares \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id": "file_123", "password": "secret123", "expires_in": 86400}'

Support

Need help with the API?

Next Steps