Back to Developers

Files

Upload and download files, isolated per workspace and ready to attach to records.

Overview

Store files — images, documents, attachments — through a simple multipart upload, and fetch them back by path.

Every file is isolated to your workspace; a key can only reach its own tenant files. Mark uploads public for CDN-served assets, or keep them private.

Modern server racks

What you can do

Multipart upload

POST a file under the field 'file' and get back a path, URL and size.

Tenant-isolated

Downloads are scoped to your workspace — no cross-tenant access, ever.

Public or private

Choose CDN-served public assets or private files fetched on demand.

Reference

Upload a file and download it back by path.

# Upload a file (multipart)
curl -X POST https://api.megorix.com/files/upload \
  -H "Authorization: Bearer $MEGORIX_API_KEY" \
  -F "[email protected]"

# → { "path": "uploads/<tenant>/<file>", "url": "https://cdn...", "size": 12345 }

# Download a file by path
curl "https://api.megorix.com/files/download?path=uploads/<tenant>/<file>" \
  -H "Authorization: Bearer $MEGORIX_API_KEY" -o invoice.pdf
Endpoints
POST
/files/uploadUpload a file (multipart field "file")
GET
/files/download?path=Download a file by its path

Try it now

Open the interactive API reference and make your first call in minutes.

    Files — Megorix Developers | Megorix