welcome Abang abang
Advertisement

API Documentation

Welcome to the w-upload Developer API. Build powerful file management integrations with our secure, high-performance endpoints. Whether you are automating backups or building a custom frontend, our API provides full control.

Authentication

Authenticate your requests using either a Bearer Token (JWT) or a persistent API Key.

Method 1: Bearer Token (Browser/Session)
Authorization: Bearer <your_jwt_token>
Method 2: API Key (Server-to-Server)
x-api-key: <your_api_key>

Generate your API Keys in the Account Settings page. Treat these keys like passwords.

Upload API

POST /api/upload

Upload a file using Base64 encoding. Ideal for small to medium files via JSON.

Body (JSON):
{
  "filename": "image.png",
  "base64": "data:image/png;base64,iVBORw0KGgo...",
  "contentType": "image/png",
  "isPublic": true,
  "description": "Uploaded via API"
}
POST /api/upload/remote

Fetch a file directly from an external URL.

Body (JSON):
{
  "url": "https://example.com/file.pdf",
  "parentId": "optional_folder_id"
}
POST /api/upload/chunk/init

Initialize a large file upload session.

File Operations

POST /api/folder

Create a new directory.

{ "name": "Backup 2024", "parentId": null }
PUT /api/files/:id/protect

Update security settings for a file.

{
  "password": "secret123",
  "expires": 24, // hours
  "burn": "true" // true/false string
}
DELETE /api/files/:id

Move a file to the trash bin.

Webhooks

Receive real-time HTTP POST notifications when events occur in your account. Configure your endpoint in Settings.

Event: file.uploaded

Triggered when a file is successfully saved.

Event: file.deleted

Triggered when a file is moved to trash.

Example Payload:
{
  "event": "file.uploaded",
  "timestamp": "2024-03-20T10:00:00Z",
  "data": {
    "fileId": "65f8a...",
    "filename": "document.pdf",
    "size": 102400,
    "url": "https://w-upload.com/file/doc_123"
  }
}

Verify the request using the X-Webhook-Signature header (HMAC SHA256 of the body signed with your secret).

Security Features

  • Passkeys (WebAuthn): Biometric login support (FaceID/TouchID).
  • 2FA (TOTP): Time-based One-Time Passwords for extra security.
  • IP Fencing: Restrict file access to specific geographical coordinates.
  • Virus Scan: Integration with VirusTotal API for malware detection.
  • Session Control: View and revoke active sessions remotely.

Integration Tools

File Request Links

Generate public links to let others upload directly to your folder.

Email Sharing

Send secure access links directly via email with custom templates.

QR Codes

Instantly generate QR codes for any file URL.

Limits & Compliance

Limit Type Free Tier Pro Tier
Max File Size 1 GB 10 GB
Storage Space 1 GB 50 GB
API Rate Limit 100 req/hour 5,000 req/hour