Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/WyattBrashear/CLIF/llms.txt

Use this file to discover all available pages before exploring further.

CLIF provides four endpoints for managing files. All four require authentication via user_id and pass_hash. File storage is bounded by your account’s allocation_limit — the server rejects uploads that would exceed it.

POST /upload_file

Upload a file to your storage allocation. This endpoint uses multipart/form-data rather than JSON — all fields are sent as form parts alongside the file binary.
The server checks your storage allocation before accepting the upload. If the file would push your usage over your allocation_limit, the request is rejected with a quota error.

Request parameters

user_id
string
required
Your unique user identifier.
pass_hash
string
required
SHA-256 hex digest of your password.
filename
string
required
The name to store the file under on the server.
file
file
required
The file binary, sent as a multipart file part.

Response fields

status
string
required
"success" when the file is stored, "fail" on any error.
message
string
required
"File Uploaded" on success. See error cases below for failure messages.

Example

cURL
curl -X POST http://127.0.0.1:8000/upload_file \
  -F "user_id=YOUR_USER_ID" \
  -F "pass_hash=YOUR_PASS_HASH" \
  -F "filename=myfile.txt" \
  -F "file=@myfile.txt"
Success response
{
  "status": "success",
  "message": "File Uploaded"
}

Error cases

Returned when user_id or pass_hash is incorrect.
{
  "status": "fail",
  "message": "Authentication Failure!"
}
Returned when your used storage is already at or above your allocation limit.
{
  "status": "fail",
  "message": "Used storage is higher than allocation!"
}
Returned when the file itself is larger than your remaining free space.
{
  "status": "fail",
  "message": "File Denied! File size too large!"
}

POST /list

Return a list of all filenames owned by the authenticated user.

Request parameters

user_id
string
required
Your unique user identifier.
pass_hash
string
required
SHA-256 hex digest of your password.

Response fields

status
string
required
"success" when the request is authenticated.
directories
array
required
Array of filename entries. Each entry is a single-element array containing the filename string.

Example

curl -X POST http://127.0.0.1:8000/list \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "YOUR_USER_ID",
    "pass_hash": "YOUR_PASS_HASH"
  }'
Success response
{
  "status": "success",
  "directories": [
    ["report.pdf"],
    ["notes.txt"],
    ["backup.tar.gz"]
  ]
}

POST /retrieve-file

Download a file from your storage. The server responds with the file as a binary attachment. Use curl’s -o flag (or equivalent) to write the output to disk.
This is the only endpoint that returns a non-JSON response on success. The response body is the raw file data with Content-Disposition: attachment.

Request parameters

user_id
string
required
Your unique user identifier.
pass_hash
string
required
SHA-256 hex digest of your password.
filename
string
required
The name of the file to retrieve, exactly as returned by POST /list.

Response

On success, the response body is the binary file content with appropriate Content-Disposition headers — not a JSON object. On failure:
status
string
"fail"
message
string
"File path does not exist!" — returned with HTTP 404 when the filename is not found.

Example

cURL
curl -X POST http://127.0.0.1:8000/retrieve-file \
  -H "Content-Type: application/json" \
  -d '{"user_id": "YOUR_USER_ID", "pass_hash": "YOUR_PASS_HASH", "filename": "myfile.txt"}' \
  -o myfile.txt
Always use the -o flag when downloading with curl. Without it, the binary content prints to your terminal.

Error case

File not found (HTTP 404)
{
  "status": "fail",
  "message": "File path does not exist!"
}

POST /delete-file

Permanently delete a file from your storage allocation. Storage used by the deleted file is returned to your available quota.
Deletion is permanent. There is no recycle bin or recovery mechanism.

Request parameters

user_id
string
required
Your unique user identifier.
pass_hash
string
required
SHA-256 hex digest of your password.
filename
string
required
The name of the file to delete, exactly as returned by POST /list.

Response fields

status
string
required
"success" when the file is deleted, "fail" on any error.
message
string
required
"File Deleted" on success. See error cases below for failure messages.

Example

curl -X POST http://127.0.0.1:8000/delete-file \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "YOUR_USER_ID",
    "pass_hash": "YOUR_PASS_HASH",
    "filename": "myfile.txt"
  }'
Success response
{
  "status": "success",
  "message": "File Deleted"
}

Error cases

Returned when the filename does not exist in your storage.
{
  "status": "fail",
  "message": "File does not exist!"
}
Returned when user_id or pass_hash is incorrect.
{
  "status": "fail",
  "message": "Authentication Failure!"
}

Build docs developers (and LLMs) love