Friday, June 12, 2026 Sign InRegister FREE My Account Help
Flamenet API — Files

Files API

Upload, manage, and share files stored in secure cloud storage. All Files endpoints require authentication with a Silver or Gold API key. Storage quotas are enforced per subscription tier (Free: 100 MB, Bronze: 1 GB, Silver: 5 GB, Gold: 6 TB).

Base path: /api/flamenet/v1/files

GET /files AUTH REQUIRED

Returns a paginated list of the authenticated user's files, newest first.

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number.
per_pageinteger20Files per page (max 100).

Example request

curl https://flamenet.io/api/flamenet/v1/files \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "files": [
    {
      "id":            42,
      "file_name":    "report.pdf",
      "size_bytes":   204800,
      "size_display": "200 KB",
      "mime_type":    "application/pdf",
      "is_shared":    false,
      "share_token":  null,
      "share_url":    null,
      "share_expires":null,
      "created_at":   "2026-03-01 10:00:00",
      "updated_at":   "2026-03-01 10:00:00"
    }
  ],
  "page":     1,
  "per_page": 20,
  "total":    1
}
POST /files AUTH REQUIRED

Uploads a file to your cloud storage. Send the file as multipart/form-data using the field name file. Maximum file size is 50 MB per upload. Returns 413 if the file exceeds the per-file limit or your storage quota.

Request

FieldTypeRequiredDescription
filefileYesThe file to upload (multipart/form-data).

Example request

curl -X POST https://flamenet.io/api/flamenet/v1/files \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/report.pdf"

Example response — 201 Created

{
  "id":            42,
  "file_name":    "report.pdf",
  "size_bytes":   204800,
  "size_display": "200 KB",
  "mime_type":    "application/pdf",
  "is_shared":    false,
  "share_token":  null,
  "share_url":    null,
  "share_expires":null,
  "created_at":   "2026-03-02 09:15:00",
  "updated_at":   "2026-03-02 09:15:00"
}
Uploading a file that would push you over your storage quota returns 413 Payload Too Large with error code quota_exceeded.
GET /files/{id} AUTH REQUIRED

Returns metadata for a single file. Only the file's owner can access it.

Example request

curl https://flamenet.io/api/flamenet/v1/files/42 \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "id":            42,
  "file_name":    "report.pdf",
  "size_bytes":   204800,
  "size_display": "200 KB",
  "mime_type":    "application/pdf",
  "is_shared":    true,
  "share_token":  "a3f8c2...",
  "share_url":    "https://flamenet.io/files/?fnf_share=a3f8c2...",
  "share_expires":"2026-04-01 00:00:00",
  "created_at":   "2026-03-02 09:15:00",
  "updated_at":   "2026-03-02 10:00:00"
}
DELETE /files/{id} AUTH REQUIRED

Permanently deletes a file from cloud storage and removes its database record. This action cannot be undone.

Example request

curl -X DELETE https://flamenet.io/api/flamenet/v1/files/42 \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "deleted": true,
  "id":      42
}
PATCH /files/{id}/rename AUTH REQUIRED

Renames a file. Only the display name is changed — the underlying storage key and any existing share or download links are unaffected.

Request body (JSON)

FieldTypeRequiredDescription
namestringYesNew file name (sanitized automatically).

Example request

curl -X PATCH https://flamenet.io/api/flamenet/v1/files/42/rename \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"final-report.pdf"}'

Example response

{
  "id":         42,
  "file_name": "final-report.pdf",
  ...
}
POST /files/{id}/share AUTH REQUIRED

Creates or refreshes a public share link for the file. Anyone with the link can download the file without an account. Only one share link can be active per file at a time.

Request body (JSON)

FieldTypeRequiredDescription
expiresstringNoExpiry date in YYYY-MM-DD format. Omit for no expiry.

Example request

curl -X POST https://flamenet.io/api/flamenet/v1/files/42/share \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expires":"2026-04-01"}'

Example response

{
  "id":        42,
  "shared":    true,
  "token":     "a3f8c2d1...",
  "share_url": "https://flamenet.io/files/?fnf_share=a3f8c2d1...",
  "expires":   "2026-04-01 00:00:00"
}
DELETE /files/{id}/share AUTH REQUIRED

Revokes the file's share link immediately. Any existing share URLs will return 404.

Example request

curl -X DELETE https://flamenet.io/api/flamenet/v1/files/42/share \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "id":     42,
  "shared": false
}
GET /files/{id}/download AUTH REQUIRED

Returns a presigned download URL for the file. The URL is valid for 5 minutes and grants direct access to the file in cloud storage. Follow the URL to begin the download.

Example request

curl https://flamenet.io/api/flamenet/v1/files/42/download \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "download_url": "https://your-bucket.s3.us-east-1.amazonaws.com/flamenet-files/...",
  "expires_in":   300
}

Fetch download_url directly to stream the file. The URL cannot be used after expires_in seconds — call this endpoint again to get a fresh URL.

FlameNet Weekly: the best of the forum, freshest listings, top Q&A — delivered every Sunday.
13 members · 0 new today · 0 online now · 713 posts in last 24h