API Documentation

AUTHENTICATION

Uploading files now requires authentication. You must generate an API token from your Profile. Include this token in your requests using the Bearer Token method.

Header: Authorization: Bearer YOUR_TOKEN_HERE

UPLOAD

When you send us files with POST, we store them and return an url for you in JSON.

Request Example

Replace YOUR_TOKEN with the token generated in your profile.

Successful Response

{
    "status": true,
    "data": {
        "file": {
            "url": {
                "full": "https://file.fast/BpQ/test",
                "short": "https://file.fast/BpQ"
            },
            "metadata": {
                "id": "BpQ",
                "name": "test.txt",
                "size": {
                    "bytes": 13,
                    "readable": "13 B"
                }
            }
        }
    }
}

Error Responses

{
    "status": false,
    "errors": {
        "file": ["The file may not be greater than 5 GB."]
    }
}

// Invalid token:
{
    "status": false,
    "errors": {
        "message": "Unauthenticated."
    }
}

INFO

Get info about a file. Use the [status] key to check if a file exists.

Request Example

Response

{
    "status": true,
    "data": {
        "file": {
            "url": {
                "full": "https://file.fast/m40/test",
                "short": "https://file.fast/m40"
            },
            "metadata": {
                "id": "m40",
                "name": "test.txt",
                "size": {
                    "bytes": "162249833",
                    "readable": "154.73 MiB"
                }
            }
        }
    }
}

LIST FILES

Get a list of your uploaded files. Use ?page=N for pagination.

Request Example

Response

{
    "status": true,
    "data": {
        "files": [
            {
                "url": { "full": "...", "short": "..." },
                "metadata": { "id": "BpQ", "name": "test.txt", "size": {...} }
            }
        ],
        "pagination": {
            "current_page": 1,
            "last_page": 1,
            "per_page": 20,
            "total": 1
        }
    }
}

DELETE FILE

Permanently delete a file using its ID.

Request Example

Response

{
    "status": true,
    "message": "File deleted successfully."
}

FOLDERS

Get a list of your folders. Use ?parent_id=FOLDER_ID to list subfolders.

Request Example

Response

{
    "status": true,
    "data": {
        "folders": [
            {
                "id": "abc-123-uuid",
                "name": "My Folder",
                "file_count": 5,
                "subfolder_count": 2,
                "created_at": "2024-01-15T10:30:00+00:00"
            }
        ]
    }
}

List Files in Folder