{"id":1419,"date":"2026-03-02T13:59:01","date_gmt":"2026-03-02T13:59:01","guid":{"rendered":"http:\/\/localhost:8881\/api-files\/"},"modified":"2026-03-02T13:59:01","modified_gmt":"2026-03-02T13:59:01","slug":"api-files","status":"publish","type":"page","link":"https:\/\/flamenet.io\/api-files\/","title":{"rendered":"Flamenet API \u2014 Files"},"content":{"rendered":"<nav class=\"api-nav\"><span class=\"api-nav-brand\">&#9670; Flamenet API<\/span><a href=\"https:\/\/flamenet.io\/api-docs\/\">Overview<\/a><a href=\"https:\/\/flamenet.io\/api-forum\/\">Forum<\/a><a href=\"https:\/\/flamenet.io\/api-answers\/\">Answers<\/a><a href=\"https:\/\/flamenet.io\/api-shop\/\">Shop<\/a><a href=\"https:\/\/flamenet.io\/api-marketplace\/\">Marketplace<\/a><a href=\"https:\/\/flamenet.io\/api-files\/\" class=\"active\">Files<\/a><a href=\"https:\/\/flamenet.io\/api-videos\/\">Video<\/a><\/nav><div class=\"api-wrap\">        <h1>Files API<\/h1>\n        <p>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&nbsp;MB, Bronze: 1&nbsp;GB, Silver: 5&nbsp;GB, Gold: 6&nbsp;TB).<\/p>\n        <p><strong>Base path:<\/strong> <code>\/api\/flamenet\/v1\/files<\/code><\/p>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-get\">GET<\/span>\n            <span class=\"endpoint-path\">\/files<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Returns a paginated list of the authenticated user's files, newest first.<\/p>\n            <h3>Query parameters<\/h3>\n            <table>\n              <thead><tr><th>Parameter<\/th><th>Type<\/th><th>Default<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>page<\/code><\/td><td>integer<\/td><td>1<\/td><td>Page number.<\/td><\/tr>\n                <tr><td><code>per_page<\/code><\/td><td>integer<\/td><td>20<\/td><td>Files per page (max 100).<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl https:\/\/flamenet.io\/api\/flamenet\/v1\/files \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">files<\/span>\": [\n    {\n      \"<span class=\"key\">id<\/span>\":            <span class=\"num\">42<\/span>,\n      \"<span class=\"key\">file_name<\/span>\":    \"<span class=\"str\">report.pdf<\/span>\",\n      \"<span class=\"key\">size_bytes<\/span>\":   <span class=\"num\">204800<\/span>,\n      \"<span class=\"key\">size_display<\/span>\": \"<span class=\"str\">200 KB<\/span>\",\n      \"<span class=\"key\">mime_type<\/span>\":    \"<span class=\"str\">application\/pdf<\/span>\",\n      \"<span class=\"key\">is_shared<\/span>\":    <span class=\"num\">false<\/span>,\n      \"<span class=\"key\">share_token<\/span>\":  <span class=\"num\">null<\/span>,\n      \"<span class=\"key\">share_url<\/span>\":    <span class=\"num\">null<\/span>,\n      \"<span class=\"key\">share_expires<\/span>\":<span class=\"num\">null<\/span>,\n      \"<span class=\"key\">created_at<\/span>\":   \"<span class=\"str\">2026-03-01 10:00:00<\/span>\",\n      \"<span class=\"key\">updated_at<\/span>\":   \"<span class=\"str\">2026-03-01 10:00:00<\/span>\"\n    }\n  ],\n  \"<span class=\"key\">page<\/span>\":     <span class=\"num\">1<\/span>,\n  \"<span class=\"key\">per_page<\/span>\": <span class=\"num\">20<\/span>,\n  \"<span class=\"key\">total<\/span>\":    <span class=\"num\">1<\/span>\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-post\">POST<\/span>\n            <span class=\"endpoint-path\">\/files<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Uploads a file to your cloud storage. Send the file as <code>multipart\/form-data<\/code> using the field name <code>file<\/code>. Maximum file size is 50&nbsp;MB per upload. Returns <code>413<\/code> if the file exceeds the per-file limit or your storage quota.<\/p>\n            <h3>Request<\/h3>\n            <table>\n              <thead><tr><th>Field<\/th><th>Type<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>file<\/code><\/td><td>file<\/td><td>Yes<\/td><td>The file to upload (multipart\/form-data).<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl -X POST https:\/\/flamenet.io\/api\/flamenet\/v1\/files \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -F \"file=@\/path\/to\/report.pdf\"<\/pre>\n            <h3>Example response \u2014 201 Created<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":            <span class=\"num\">42<\/span>,\n  \"<span class=\"key\">file_name<\/span>\":    \"<span class=\"str\">report.pdf<\/span>\",\n  \"<span class=\"key\">size_bytes<\/span>\":   <span class=\"num\">204800<\/span>,\n  \"<span class=\"key\">size_display<\/span>\": \"<span class=\"str\">200 KB<\/span>\",\n  \"<span class=\"key\">mime_type<\/span>\":    \"<span class=\"str\">application\/pdf<\/span>\",\n  \"<span class=\"key\">is_shared<\/span>\":    <span class=\"num\">false<\/span>,\n  \"<span class=\"key\">share_token<\/span>\":  <span class=\"num\">null<\/span>,\n  \"<span class=\"key\">share_url<\/span>\":    <span class=\"num\">null<\/span>,\n  \"<span class=\"key\">share_expires<\/span>\":<span class=\"num\">null<\/span>,\n  \"<span class=\"key\">created_at<\/span>\":   \"<span class=\"str\">2026-03-02 09:15:00<\/span>\",\n  \"<span class=\"key\">updated_at<\/span>\":   \"<span class=\"str\">2026-03-02 09:15:00<\/span>\"\n}<\/pre>\n            <div class=\"api-warn\">Uploading a file that would push you over your storage quota returns <code>413 Payload Too Large<\/code> with error code <code>quota_exceeded<\/code>.<\/div>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-get\">GET<\/span>\n            <span class=\"endpoint-path\">\/files\/{id}<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Returns metadata for a single file. Only the file's owner can access it.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl https:\/\/flamenet.io\/api\/flamenet\/v1\/files\/42 \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":            <span class=\"num\">42<\/span>,\n  \"<span class=\"key\">file_name<\/span>\":    \"<span class=\"str\">report.pdf<\/span>\",\n  \"<span class=\"key\">size_bytes<\/span>\":   <span class=\"num\">204800<\/span>,\n  \"<span class=\"key\">size_display<\/span>\": \"<span class=\"str\">200 KB<\/span>\",\n  \"<span class=\"key\">mime_type<\/span>\":    \"<span class=\"str\">application\/pdf<\/span>\",\n  \"<span class=\"key\">is_shared<\/span>\":    <span class=\"num\">true<\/span>,\n  \"<span class=\"key\">share_token<\/span>\":  \"<span class=\"str\">a3f8c2...<\/span>\",\n  \"<span class=\"key\">share_url<\/span>\":    \"<span class=\"str\">https:\/\/flamenet.io\/files\/?fnf_share=a3f8c2...<\/span>\",\n  \"<span class=\"key\">share_expires<\/span>\":\"<span class=\"str\">2026-04-01 00:00:00<\/span>\",\n  \"<span class=\"key\">created_at<\/span>\":   \"<span class=\"str\">2026-03-02 09:15:00<\/span>\",\n  \"<span class=\"key\">updated_at<\/span>\":   \"<span class=\"str\">2026-03-02 10:00:00<\/span>\"\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-delete\">DELETE<\/span>\n            <span class=\"endpoint-path\">\/files\/{id}<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Permanently deletes a file from cloud storage and removes its database record. This action cannot be undone.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl -X DELETE https:\/\/flamenet.io\/api\/flamenet\/v1\/files\/42 \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">deleted<\/span>\": <span class=\"num\">true<\/span>,\n  \"<span class=\"key\">id<\/span>\":      <span class=\"num\">42<\/span>\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-patch\">PATCH<\/span>\n            <span class=\"endpoint-path\">\/files\/{id}\/rename<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Renames a file. Only the display name is changed \u2014 the underlying storage key and any existing share or download links are unaffected.<\/p>\n            <h3>Request body (JSON)<\/h3>\n            <table>\n              <thead><tr><th>Field<\/th><th>Type<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>name<\/code><\/td><td>string<\/td><td>Yes<\/td><td>New file name (sanitized automatically).<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl -X PATCH https:\/\/flamenet.io\/api\/flamenet\/v1\/files\/42\/rename \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"name\":\"final-report.pdf\"}'<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":         <span class=\"num\">42<\/span>,\n  \"<span class=\"key\">file_name<\/span>\": \"<span class=\"str\">final-report.pdf<\/span>\",\n  ...\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-post\">POST<\/span>\n            <span class=\"endpoint-path\">\/files\/{id}\/share<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">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.<\/p>\n            <h3>Request body (JSON)<\/h3>\n            <table>\n              <thead><tr><th>Field<\/th><th>Type<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>expires<\/code><\/td><td>string<\/td><td>No<\/td><td>Expiry date in <code>YYYY-MM-DD<\/code> format. Omit for no expiry.<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl -X POST https:\/\/flamenet.io\/api\/flamenet\/v1\/files\/42\/share \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"expires\":\"2026-04-01\"}'<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":        <span class=\"num\">42<\/span>,\n  \"<span class=\"key\">shared<\/span>\":    <span class=\"num\">true<\/span>,\n  \"<span class=\"key\">token<\/span>\":     \"<span class=\"str\">a3f8c2d1...<\/span>\",\n  \"<span class=\"key\">share_url<\/span>\": \"<span class=\"str\">https:\/\/flamenet.io\/files\/?fnf_share=a3f8c2d1...<\/span>\",\n  \"<span class=\"key\">expires<\/span>\":   \"<span class=\"str\">2026-04-01 00:00:00<\/span>\"\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-delete\">DELETE<\/span>\n            <span class=\"endpoint-path\">\/files\/{id}\/share<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Revokes the file's share link immediately. Any existing share URLs will return 404.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl -X DELETE https:\/\/flamenet.io\/api\/flamenet\/v1\/files\/42\/share \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":     <span class=\"num\">42<\/span>,\n  \"<span class=\"key\">shared<\/span>\": <span class=\"num\">false<\/span>\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-get\">GET<\/span>\n            <span class=\"endpoint-path\">\/files\/{id}\/download<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Returns a presigned download URL for the file. The URL is valid for <strong>5 minutes<\/strong> and grants direct access to the file in cloud storage. Follow the URL to begin the download.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl https:\/\/flamenet.io\/api\/flamenet\/v1\/files\/42\/download \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">download_url<\/span>\": \"<span class=\"str\">https:\/\/your-bucket.s3.us-east-1.amazonaws.com\/flamenet-files\/...<\/span>\",\n  \"<span class=\"key\">expires_in<\/span>\":   <span class=\"num\">300<\/span>\n}<\/pre>\n            <p>Fetch <code>download_url<\/code> directly to stream the file. The URL cannot be used after <code>expires_in<\/code> seconds \u2014 call this endpoint again to get a fresh URL.<\/p>\n          <\/div>\n        <\/div>\n        <div class=\"api-footer\">Flamenet API v1.0 &mdash; <a href=\"https:\/\/flamenet.io\/api-docs\/\">API Overview<\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1419","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/flamenet.io\/api\/wp\/v2\/pages\/1419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flamenet.io\/api\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/flamenet.io\/api\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/flamenet.io\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flamenet.io\/api\/wp\/v2\/comments?post=1419"}],"version-history":[{"count":0,"href":"https:\/\/flamenet.io\/api\/wp\/v2\/pages\/1419\/revisions"}],"wp:attachment":[{"href":"https:\/\/flamenet.io\/api\/wp\/v2\/media?parent=1419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}