Documentation

Patrins is a fast and simple file hosting platform. Upload, organize, and share your files with ease.

Getting Started

Using Patrins is straightforward:

  1. Sign in with Google at patrins.com/login
  2. Upload your files through the dashboard or drag-and-drop interface
  3. Organize files into folders for better management
  4. Share files with direct download links or folder shares

Uploading Files

Patrins supports multiple ways to upload files:

Dashboard Upload

Click the "Upload" button in your dashboard to select files from your computer. You can:

Drag and Drop

Simply drag files from your computer directly into the dashboard. Files will upload automatically.

Supported File Types

Patrins supports all file types including:

Organizing Files

Keep your files organized with folders:

Creating Folders

Click "New Folder" in your dashboard to create a new folder. You can create nested folders for better organization.

Moving Files

Drag and drop files between folders or use the "Move" option from the file menu.

Starred Files

Star important files for quick access. View all starred files from the sidebar.

Sharing Files

Patrins makes it easy to share files with others:

Individual File Sharing

Click "Copy Link" on any file to get a shareable download link. Recipients can download the file without needing an account.

https://patrins.com/f/abc123def456

Folder Sharing

Right-click a folder and select "Share Folder" to create a shared folder page. This allows others to:

Share Links: Anyone with the share link can access your files. Keep links private and only share with trusted recipients.

Download Pages

File download pages include:

Temporary Files

Create files that automatically delete after a set time:

Upload Temporary Files

When uploading, choose "Temporary File" and set an expiration time:

Viewing Temporary Files

Access all temporary files from the "Temporary" section in your dashboard sidebar. Files show remaining time before deletion.

Auto-Deletion: Temporary files are permanently deleted when they expire. This action cannot be undone.

Storage & Limits

File size and storage limits depend on your account plan:

Plan Storage Max File Size Bandwidth
Free 8 GB Unlimited Unlimited
Pro / Business Custom — any amount of TB you need Unlimited Unlimited

Rate Limits

To ensure fair usage, the following rate limits apply:

EndpointLimitKey
Public upload init (files < 1 GB)500 / hourIP
Public upload init (files ≥ 1 GB)30 / hourIP
Public upload chunks500 / hourIP
Public upload finalize30 / hourIP
Bulk download (zip)10 / hourUser
File search60 / minUser
File details (hash)20 / minUser
Video duration probe30 / minIP
Remote upload (concurrent)4 active at onceServer-wide queue

Developer API

Patrins provides a REST API for programmatic file uploads and management. Authenticate using an API key generated from your dashboard.

Authentication

All API requests require an API key. Generate one from your dashboard under Settings → Account → API Keys.

Authorization: Bearer patrins_your_api_key_here

Getting an API key: Dashboard → Settings → Account → Click "Generate New Key"

Upload Files (3-Step Process)

Step 1: Initialize Upload

POST https://patrins.com/api/upload-direct/init
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{
  "fileName": "example.pdf",
  "fileSize": 1024,
  "mimeType": "application/pdf",
  "folderId": "optional-folder-id"
}

Response:

{
  "uploadId": "abc123",
  "uploadUrl": "/api/webdav-upload/abc123/file.pdf"
}

Step 2: Stream File Data

PUT https://patrins.com{uploadUrl}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/octet-stream

[Binary file data]

Step 3: Finalize Upload

POST https://patrins.com/api/upload-finalize
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{
  "uploadId": "abc123"
}

Response:

{
  "success": true,
  "file": {
    "id": "6b8b413bf05f",
    "name": "example.pdf",
    "size": 1024
  }
}

Folder Management

All folder endpoints require authentication via API key.

MethodEndpointDescription
POST/api/foldersCreate a folder or subfolder
GET/api/foldersList root folders (or children of a parent)
GET/api/folders/{id}Get folder details + breadcrumb path
GET/api/files/folder/{id}List files inside a folder
PATCH/api/folders/{id}Rename a folder
PATCH/api/folders/{id}/moveMove folder to a different parent
POST/api/folders/{id}/trashMove folder to trash (recoverable)
DELETE/api/folders/{id}Permanently delete folder & contents

Create a root folder:

POST https://patrins.com/api/folders
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{
  "name": "My Folder"
}

// Response
{
  "success": true,
  "folder": {
    "id": "40abb181-34a8-4ff0-8be1-80492fd592f6",
    "name": "My Folder",
    "parentId": null,
    "createdAt": "2026-05-03T09:28:04.899Z"
  }
}

Create a subfolder (child folder):

Pass the parent folder's id as parentId to nest it inside another folder. There is no depth limit.

POST https://patrins.com/api/folders
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{
  "name": "2026",
  "parentId": "40abb181-34a8-4ff0-8be1-80492fd592f6"
}

// Response
{
  "success": true,
  "folder": {
    "id": "5b60ddbf-2235-4037-8ddc-1331041480c8",
    "name": "2026",
    "parentId": "40abb181-34a8-4ff0-8be1-80492fd592f6",
    "createdAt": "2026-05-03T09:28:05.615Z"
  }
}

List root folders:

GET https://patrins.com/api/folders
Authorization: Bearer YOUR_TOKEN

// Response
{
  "folders": [
    { "id": "40abb181...", "name": "My Folder", "parentId": null, "createdAt": "...", "updatedAt": "..." }
  ]
}

List subfolders (children of a folder):

Use the parentId query parameter to get only the direct children of a specific folder.

GET https://patrins.com/api/folders?parentId={folderId}
Authorization: Bearer YOUR_TOKEN

// Response
{
  "folders": [
    { "id": "5b60ddbf...", "name": "2026", "parentId": "40abb181...", "createdAt": "...", "updatedAt": "..." }
  ]
}

Get folder details + breadcrumb path:

GET https://patrins.com/api/folders/{folderId}
Authorization: Bearer YOUR_TOKEN

// Response
{
  "folder": { "id": "5b60ddbf...", "name": "2026", "parentId": "40abb181..." },
  "breadcrumbs": [
    { "id": "40abb181...", "name": "My Folder" },
    { "id": "5b60ddbf...", "name": "2026" }
  ]
}

List files inside a folder:

// Files inside a specific folder
GET https://patrins.com/api/files/folder/{folderId}
Authorization: Bearer YOUR_TOKEN

// Files at root (no folder)
GET https://patrins.com/api/files/folder
Authorization: Bearer YOUR_TOKEN

// Response
{
  "files": [
    {
      "id": "abc123",
      "name": "report.pdf",
      "size": "1.2 MB",
      "sizeBytes": 1258291,
      "mimeType": "application/pdf",
      "downloads": 4,
      "createdAt": "2026-05-01T10:00:00.000Z"
    }
  ]
}

Rename a folder:

PATCH https://patrins.com/api/folders/{folderId}
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{ "name": "New Name" }

// Response
{ "success": true, "name": "New Name" }

Move folder to a different parent:

PATCH https://patrins.com/api/folders/{folderId}/move
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{ "parentId": "target-folder-id" }  // null to move to root

// Response
{ "success": true }

Trash / delete a folder:

// Soft delete — moves to trash, recoverable
POST https://patrins.com/api/folders/{folderId}/trash
Authorization: Bearer YOUR_TOKEN

// Hard delete — permanent, removes folder and all contents
DELETE https://patrins.com/api/folders/{folderId}
Authorization: Bearer YOUR_TOKEN

Tip: To traverse a full tree, first call GET /api/folders for root folders, then call GET /api/folders?parentId={id} for each folder to get its children.

Folder Share Links

Generate a public share link for any folder. Anyone with the link can browse the folder and its subfolders — no account needed. Optionally set an expiry time, password-protect it, or disable downloads.

Create a share link:

POST https://patrins.com/api/folders/{folderId}/share
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{
  expiresIn: 86400,      // seconds until expiry — omit for a permanent link
  allowDownload: true,   // set false to prevent file downloads (browse-only)
  password: secret     // omit for a public (no-password) link
}

// Response
{
  success: true,
  share: {
    id: 5a5e8548bcbf,
    url: https://patrins.com/s/f7f79ba2477915dc388ad8bd9ada4088,
    token: f7f79ba2477915dc388ad8bd9ada4088,
    expiresAt: null   // or ISO timestamp if expiresIn was set
  }
}

Note: Each call to this endpoint generates a new share link. All generated links for the same folder remain active simultaneously.

Browse a shared folder (public — no auth required):

GET https://patrins.com/api/shared/{token}/contents
// Optional: browse a subfolder within the share
GET https://patrins.com/api/shared/{token}/contents?folderId={subFolderId}

// Response
{
  folders: [
    { id: 7a841acb..., name: Mac, created_at: ... },
    { id: ccfa5774..., name: Windows, created_at: ... }
  ],
  files: [
    { id: abc123, name: setup.exe, size: 52428800, ... }
  ],
  breadcrumb: [
    { id: 8121f0b5..., name: Softwares }
  ]
}

File Management

List All Files:

GET https://patrins.com/api/files
Authorization: Bearer YOUR_TOKEN

Get File Info:

GET https://patrins.com/api/files/{fileId}/info
Authorization: Bearer YOUR_TOKEN

Remote Upload

Upload files directly from URLs without downloading them to your device first.

Start Remote Upload:

POST https://patrins.com/api/remote-upload
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "url": "https://example.com/file.zip",
  "fileName": "optional-custom-name.zip",
  "folderId": "folder-id-optional",
  "encryptionKey": "optional-encryption-key"
}

Response:

{
  "uploadId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "starting"
}

Check Upload Status:

GET https://patrins.com/api/remote-upload/{uploadId}/status
Authorization: Bearer YOUR_TOKEN

Status Response:

{
  "status": "downloading",  // "queued" | "starting" | "downloading" | "storing" | "complete" | "error"
  "progress": 75,           // percentage
  "downloaded": 7516192768, // bytes downloaded
  "total": 10021691392,     // total bytes
  "speed": "45.2 MB/s",
  "eta": "30s",
  "fileName": "file.zip",
  "fileId": "abc123def456" // present when complete
}

Concurrency limit: The server runs a maximum of 4 remote uploads simultaneously. If you start more, additional jobs receive "status": "queued" and start automatically as slots free up. Poll the status endpoint to track progress.

Example: Upload with cURL

API_KEY="patrins_your_api_key_here"

# 1. Initialize
RESPONSE=$(curl -s -X POST https://patrins.com/api/upload-direct/init   -H "Content-Type: application/json"   -H "Authorization: Bearer $API_KEY"   -d '{"fileName":"test.txt","fileSize":100,"mimeType":"text/plain"}')

# Extract uploadId and uploadUrl from response
# 2. Upload file
curl -X PUT "https://patrins.com/api/webdav-upload/..."   -H "Authorization: Bearer $API_KEY"   --data-binary "@test.txt"

# 3. Finalize
curl -s -X POST https://patrins.com/api/upload-finalize   -H "Content-Type: application/json"   -H "Authorization: Bearer $API_KEY"   -d '{"uploadId":"..."}'

Rate Limits

EndpointLimitKey
Public upload init (< 1 GB files)500 / hourIP
Public upload init (≥ 1 GB files)30 / hourIP
Public upload chunks500 / hourIP
Public upload finalize30 / hourIP
Remote upload (concurrent slots)4 active at once (queue-based)Server-wide
Bulk download / zip10 / hourUser
Search60 / minUser
File details (SHA-1 hash)20 / minUser
Video duration probe30 / minIP
HLS stream generation (concurrent)3 active at onceServer-wide

Security: Keep your API key private. If compromised, delete it from your dashboard and generate a new one.

Plans & Pricing

All plans include unlimited file size, unlimited bandwidth, and every platform feature. The only difference between plans is storage quota.

Free

Paid Plans

Need more storage? We offer custom storage quotas — any amount of TB you need. Pricing is based on the storage you choose.

Visit patrins.com/pricing for current pricing or contact us to discuss a custom plan.

Need Help? Contact us at support@patrins.com or visit our status page for system updates.