Base URL: https://files.union-crax.xyz
All request and response bodies use JSON unless noted. All responses are UTF-8.
POST /api/auth/login or register via
POST /api/auth/register. A fh_session cookie is set automatically.X-API-Key: your32charhashhere/api/auth/register{"ok":true,"hash":"V3ryL0ngRand0mKey32CharsHere","created_at":"2026-03-02T12:00:00Z"}hash. It is your only login credential.
There is no recovery mechanism.
/api/auth/login{"hash":"your32charhashhere"}curl -c cookies.txt -X POST -H "Content-Type: application/json" \
-d '{"hash":"your32charhashhere"}' https://files.union-crax.xyz/api/auth/login{"ok":true,"hash":"your32charhashhere"}fh_session cookie valid for 30 days.
/api/auth/logout{"ok":true}
/api/auth/me [auth required]curl -H "X-API-Key: your32charhashhere" https://files.union-crax.xyz/api/auth/me{"ok":true,"hash":"your32charhashhere","created_at":"2026-03-02T12:00:00Z","file_count":5}
/api/upload [auth required]multipart/form-datafile — the file to upload (required)curl -H "X-API-Key: your32charhashhere" \
-F "[email protected]" https://files.union-crax.xyz/api/upload{"ok":true,"file_id":"AbCd1234XyZ56789","url":"/f/AbCd1234XyZ56789","written":204800}/f/<file_id> — the file landing page. The raw download is at /dl/<file_id>.
/api/files [auth required]curl -H "X-API-Key: your32charhashhere" https://files.union-crax.xyz/api/files{"ok":true,"files":[
{
"file_id":"AbCd1234XyZ56789",
"owner":"your32charhashhere",
"original_name":"photo.jpg",
"size":204800,
"uploaded_at":"2026-03-02T12:00:00Z",
"downloads":3,
"views":12
}
]}
/api/delete [auth required, own files only]{"id":"AbCd1234XyZ56789"}curl -H "X-API-Key: your32charhashhere" \
-X POST -H "Content-Type: application/json" \
-d '{"id":"AbCd1234XyZ56789"}' https://files.union-crax.xyz/api/delete{"ok":true}403 Forbidden if the file belongs to another account.
/f/<file_id>/dl/<file_id>Content-Disposition: attachment. Increments the download counter.curl -OJ https://files.union-crax.xyz/dl/AbCd1234XyZ56789
/api/folders/create [auth required]{"name":"my-folder"}{"ok":true,"name":"my-folder"}
/api/folders [auth required]{"ok":true,"folders":[{"name":"my-folder","owner":"...","created_at":"..."}]}
/api/folders/delete [auth required]{"name":"my-folder"}{"ok":true,"deleted_files":3}
/api/mass-delete [auth required, own files only]{"ids":["fileId1","fileId2"]}{"ok":true,"deleted":2}
/api/publink/create [auth required]{"folder":"","minutes":60}{"ok":true,"token":"abc123","url":"/pub/abc123","expires_at":"..."}
/api/publinks [auth required]{"ok":true,"links":[{"token":"abc123","owner":"...","folder":"","expires_at":"...","created_at":"..."}]}
/api/publink/delete [auth required]{"token":"abc123"}{"ok":true}
/api/stats{"ok":true,"total_files":42,"total_size":1073741824}
400 — Bad request (missing fields, invalid JSON)401 — Unauthorized (missing or invalid session / API key)403 — Forbidden (file belongs to another account)404 — File not found405 — Wrong HTTP method500 — Server error