Files Hub Public Pages
API Documentation

Files Hub API Documentation - Complete guide for file storage, email, and 20 utility services

API Documentation

Table of Contents

Postman Collection

Import our Postman collection to test all API endpoints.

Download Collection

Getting Started

Files Hub provides a RESTful API with 22 services for file storage, email, and utility features.

Base URL: https://fileshub.zaions.com/api/v1

Authentication

Include your API key in the X-API-Key header.

curl -X GET "https://fileshub.zaions.com/api/v1/objects" \
  -H "X-API-Key: your-api-key-here"

Permissions

API keys have granular permissions. Enable specific services in the Nova admin panel.

url_shortener qr_code image_processing pdf_generation push_notifications webhooks feature_flags link_preview analytics audit_log paste_bin ip_geolocation scheduled_tasks encryption_vault data_export health_monitoring contact_form otp notification_center app_version

File Storage API

Upload, manage, and serve files with secure access control.

POST /api/v1/objects

Upload a file

curl -X POST "https://fileshub.zaions.com/api/v1/objects" \
  -H "X-API-Key: your-api-key" \
  -F "file=@/path/to/document.pdf" \
  -F "visibility=public"
GET /api/v1/objects

List files with pagination

{
  "data": [{"public_id": "abc123", "original_name": "doc.pdf", "mime_type": "application/pdf", "size": 102400, "url": "..."}],
  "meta": {"current_page": 1, "last_page": 5, "per_page": 15, "total": 72}
}

Other endpoints: GET /api/v1/objects/{id} (get file), DELETE /api/v1/objects/{id} (delete)

Email API

Send transactional emails using templates or raw content.

Permission Required: email

POST /api/v1/emails/send

Send an email

curl -X POST "https://fileshub.zaions.com/api/v1/emails/send" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"to": "user@example.com", "template": "welcome", "variables": {"name": "John"}}'

Other endpoints: GET /templates, GET /emails, GET /emails/{id}

URL Shortener API

Create short URLs with click tracking and analytics.

Permission: url_shortener

POST /api/v1/short-urls

Create a short URL

Field Type Required Description
original_url string Yes URL to shorten
title string No Friendly name
expires_at datetime No Expiration date (ISO 8601)
max_clicks integer No Maximum allowed clicks
curl -X POST "https://fileshub.zaions.com/api/v1/short-urls" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"original_url": "https://example.com/very-long-url", "title": "My Link"}'

Response

{
  "data": {
    "public_id": "01ABC...",
    "code": "x7k9m",
    "short_url": "https://fileshub.zaions.com/s/x7k9m",
    "original_url": "https://example.com/very-long-url",
    "click_count": 0
  }
}

Other: GET /short-urls (list), GET /short-urls/{id} (details + analytics), DELETE /short-urls/{id}, Redirect: GET /s/{code} (no auth)

QR Code Generator API

Generate QR codes for URLs, text, WiFi, vCard, email, and phone.

Permission: qr_code

POST /api/v1/qr-codes

Generate a QR code

curl -X POST "https://fileshub.zaions.com/api/v1/qr-codes" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"data": "https://example.com", "type": "url", "format": "png", "size": 300}'

Types: url, text, wifi, vcard, email, phone | Formats: png, svg | Size: 100-1000

Download: GET /qr-codes/{id}/download (no auth for stored QR codes)

Image Processing API

Resize, compress, crop, and convert images.

Permission: image_processing

POST /api/v1/images/resize

Resize an image

curl -X POST "https://fileshub.zaions.com/api/v1/images/resize" \
  -H "X-API-Key: your-api-key" \
  -F "file=@image.jpg" \
  -F "width=800" \
  -F "height=600"

Or use source_public_id to process an existing stored file.

Other: POST /images/compress (quality 1-100), POST /images/crop (x, y, width, height), POST /images/convert (format: jpg/png/webp/gif), POST /images/info (get metadata)

PDF Generation API

Generate PDFs from HTML or Markdown content.

Permission: pdf_generation

POST /api/v1/pdfs/from-html

Generate PDF from HTML

curl -X POST "https://fileshub.zaions.com/api/v1/pdfs/from-html" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"html": "

Report

Content here

", "title": "My Report", "page_size": "a4"}'

Page sizes: a4, letter, legal | Orientation: portrait, landscape

Other: POST /pdfs/from-markdown, GET /pdfs/{id}/download

Push Notifications API

Send push notifications via Firebase Cloud Messaging.

Permission: push_notifications

POST /api/v1/push/send-to-token

Send notification to device

curl -X POST "https://fileshub.zaions.com/api/v1/push/send-to-token" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"device_token": "fcm-token", "title": "Hello", "body": "You have a message", "data": {"key": "value"}}'

Other: POST /push/subscribe, POST /push/unsubscribe, POST /push/send-to-topic, GET /push/logs

Webhooks API

Register webhook endpoints to receive event notifications with HMAC-SHA256 signatures.

Permission: webhooks

POST /api/v1/webhooks

Register webhook endpoint

curl -X POST "https://fileshub.zaions.com/api/v1/webhooks" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/webhook", "secret": "my-secret", "events": ["file.uploaded", "file.deleted"]}'

Other: GET /webhooks, GET /webhooks/{id} (with delivery history), DELETE /webhooks/{id}

Feature Flags API

Manage feature flags and remote configuration.

Permission: feature_flags

POST /api/v1/feature-flags

Create/update a feature flag

curl -X POST "https://fileshub.zaions.com/api/v1/feature-flags" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"key": "dark_mode", "value": true, "description": "Enable dark mode", "is_active": true}'

Other: GET /feature-flags, GET /feature-flags/{key}, DELETE /feature-flags/{key}

Event Analytics API

Track custom events and get analytics summaries.

Permission: analytics

POST /api/v1/analytics/track

Track an event

curl -X POST "https://fileshub.zaions.com/api/v1/analytics/track" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"event_name": "button_click", "event_category": "ui", "properties": {"button_id": "signup"}, "session_id": "sess_123"}'

Other: POST /analytics/batch (max 100 events), GET /analytics/summary (aggregated stats)

Audit Log API

Access immutable audit trail of all API actions.

Permission: audit_log

GET /api/v1/audit-logs

List audit logs with filters

curl "https://fileshub.zaions.com/api/v1/audit-logs?action=file.upload&date_from=2024-01-01" \
  -H "X-API-Key: your-api-key"

Filters: action, entity_type, entity_id, date_from, date_to

Paste Bin API

Create and share text snippets with syntax highlighting.

Permission: paste_bin

POST /api/v1/pastes

Create a paste

curl -X POST "https://fileshub.zaions.com/api/v1/pastes" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"content": "console.log(\"hello\");", "title": "My Snippet", "syntax": "javascript", "visibility": "public"}'

Visibility: public, private, unlisted | Optional: expires_at, max_views

Other: GET /pastes, GET /pastes/{id} (public pastes need no auth), DELETE /pastes/{id}

IP Geolocation API

Lookup geographic information for IP addresses using MaxMind GeoLite2.

Permission: ip_geolocation

GET /api/v1/geoip/lookup?ip={ip}

Lookup IP address

{
  "data": {
    "ip": "8.8.8.8",
    "country": "US",
    "region": "California",
    "city": "Mountain View",
    "latitude": 37.386,
    "longitude": -122.084,
    "timezone": "America/Los_Angeles"
  }
}

Other: POST /geoip/batch (array of IPs), GET /geoip/me (lookup requester's IP)

Scheduled Tasks API

Schedule one-time or recurring tasks with cron expressions.

Permission: scheduled_tasks

POST /api/v1/scheduled-tasks

Create a scheduled task

curl -X POST "https://fileshub.zaions.com/api/v1/scheduled-tasks" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Daily Report", "type": "webhook", "target_url": "https://example.com/report", "schedule_type": "recurring", "cron_expression": "0 9 * * *", "timezone": "UTC"}'

Types: webhook, notification | Schedule: once (use run_at) or recurring (use cron_expression)

Other: GET /scheduled-tasks, GET /scheduled-tasks/{id} (with run history), DELETE /scheduled-tasks/{id}

Encryption Vault API

Store and retrieve encrypted secrets using AES-256-CBC.

Permission: encryption_vault

POST /api/v1/vault

Store a secret

curl -X POST "https://fileshub.zaions.com/api/v1/vault" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"key": "stripe_secret", "value": "sk_live_xxx", "description": "Stripe API key"}'

Other: GET /vault (list keys), GET /vault/{key} (get value), DELETE /vault/{key}, POST /vault/encrypt (stateless), POST /vault/decrypt (stateless)

Data Export API

Export data to CSV, Excel, or JSON formats.

Permission: data_export

POST /api/v1/export/csv

Export to CSV

curl -X POST "https://fileshub.zaions.com/api/v1/export/csv" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"columns": ["name", "email"], "data": [["John", "john@example.com"], ["Jane", "jane@example.com"]]}'

Returns file download. Max 10,000 rows.

Other: POST /export/excel, POST /export/json

Health Monitoring API

Monitor URL uptime with automatic email alerts.

Permission: health_monitoring

POST /api/v1/uptime-monitors

Create uptime monitor

curl -X POST "https://fileshub.zaions.com/api/v1/uptime-monitors" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "API Server", "url": "https://api.example.com/health", "method": "GET", "expected_status": 200, "check_interval_minutes": 5, "alert_email": "admin@example.com"}'

Other: GET /uptime-monitors, GET /uptime-monitors/{id} (with check history), DELETE /uptime-monitors/{id}

Contact Form API

Receive contact form submissions with rate limiting.

Permission: contact_form

POST /api/v1/contact-form

Submit contact form

curl -X POST "https://fileshub.zaions.com/api/v1/contact-form" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "John Doe", "email": "john@example.com", "subject": "Support Request", "message": "I need help with..."}'

Other: GET /contact-form (list submissions), GET /contact-form/{id}

OTP / Verification API

Generate and verify one-time passwords for authentication.

Permission: otp

POST /api/v1/otp/send

Send OTP code

curl -X POST "https://fileshub.zaions.com/api/v1/otp/send" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"identifier": "user@example.com", "purpose": "login"}'
POST /api/v1/otp/verify

Verify OTP code

curl -X POST "https://fileshub.zaions.com/api/v1/otp/verify" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"identifier": "user@example.com", "code": "123456", "purpose": "login"}'

Notification Center API

Manage in-app notifications for users.

Permission: notification_center

POST /api/v1/notifications

Create notification

curl -X POST "https://fileshub.zaions.com/api/v1/notifications" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "user_123", "title": "New Feature", "body": "Check out our new feature!", "type": "info"}'

Other: POST /notifications/batch, GET /notifications?user_id=x, GET /notifications/unread-count?user_id=x, PATCH /notifications/{id}/read, PATCH /notifications/read-all, DELETE /notifications/{id}

App Version Management API

Manage app versions and check for updates.

Permission: app_version

GET /api/v1/app-versions/check

Check for updates

curl "https://fileshub.zaions.com/api/v1/app-versions/check?platform=android¤t_version=1.0.0" \
  -H "X-API-Key: your-api-key"

Response

{
  "data": {
    "update_available": true,
    "force_update": false,
    "latest_version": "2.0.0",
    "release_url": "https://play.google.com/...",
    "changelog": "New features and bug fixes"
  }
}

Other: POST /app-versions, GET /app-versions

Error Responses

Status Description
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing API key
403 Forbidden - Missing permission or invalid origin
404 Not Found - Resource doesn't exist
422 Validation Error - Invalid input data
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error
{"error": {"code": "INVALID_API_KEY", "message": "The provided API key is invalid."}}

Rate Limiting

  • Default: 60 requests per minute per API key
  • File uploads: 60 uploads per minute
  • Email: 450 emails per day per email account
  • Batch operations: Max 100 items per request

Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Need Help?

If you have questions or need assistance with the API, please contact us.

Contact Support