My Account Subscribe Help About
Sign In | Register FREE
Tuesday, April 28, 2026
King to defend 'democratic values' as US state visit beginsSuspect charged with attempted assassination of Trump at Washington dinnerStarmer faces vote on inquiry over Mandelson vetting claimsMy tenant owes £15,000 in rent, but I can't get them out of the propertyTerror trial to begin for man accused of plotting attack on Taylor Swift concertClaire's closes all 154 stores in UK and Ireland with loss of 1,300 jobsWhen Attenborough met the gorillas - the story behind his iconic TV momentMelania Trump urges ABC to 'take stand' on Jimmy Kimmel after widow jokeHow Kenya's Sabastian Sawe broke the two-hour barrier at London MarathonDeal 'within sight' to end year-long Birmingham bin strike, says council leaderMan pleads guilty to murder 2 decades after death of Run DMC's Jam Master JayIn pictures: King Charles and Queen Camilla begin US state visitNewspaper headlines: 'United King Don' and 'PM battles to block sleaze vote'Political violence jolts the US once again - with a familiar responseWhy Spotify has no button to filter out AI music'I had £20,000 stolen and had to fight a 13-month fraud reporting rule to get it back''Hands and feet tied up': Indonesia police probe alleged abuse at childcare centreHealthy life expectancy in UK falls by two years in past decadeTaylor Swift files to trademark voice and image after AI concernsFrench coastguard rescues more than 100 migrants crossing ChannelPolice release body-worn footage showing 'reckless' car bomb attack in Northern IrelandEuropean flight prices are falling in short term, Wizz Air boss saysAt least four killed and dozens injured in Indonesia train crashAnthony Joshua signs deal to fight Tyson Fury as he returns to boxing after car crashSuperdry co-founder accused of raping womanBBC News appThe King Arrives In The US, But Can He Mend The Special Relationship?Who is Trump’s 'would-be assassin' and were there security failings at DC shooting?All but back in Champions League - yet big decisions loom at Man UtdHiggins beats O'Sullivan, Trump loses to Vafaei

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.