bayfiles.com Open in urlscan Pro
2001:678:b30:4::c  Public Scan

Submitted URL: http://api.bayfiles.com/
Effective URL: https://bayfiles.com/docs/api
Submission: On July 27 via manual from MX — Scanned from GB

Form analysis 0 forms found in the DOM

Text Content

API DOCUMENTATION



--------------------------------------------------------------------------------


UPLOAD

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


REQUEST EXAMPLE

curl -F "file=@test.txt" https://api.bayfiles.com/upload


SUCCESSFUL RESPONSE

{
    "status": true,
    "data": {
        "file": {
            "url": {
                "full": "https://bayfiles.com/u1C0ebc4b0/file.txt",
                "short": "https://bayfiles.com/u1C0ebc4b0"
            },
            "metadata": {
                "id": "u1C0ebc4b0",
                "name": "file.txt",
                "size": {
                    "bytes": 6861,
                    "readable": "6.7 KB"
                }
            }
        }
    }
}


ERROR RESPONSE

{
    "status": false,
    "error": {
        "message": "The file is too large. Max filesize: 5 GiB",
        "type": "ERROR_FILE_SIZE_EXCEEDED",
        "code": 31
    }
}


ERROR CODES & TYPES

 * (10) ERROR_FILE_NOT_PROVIDED
 * (11) ERROR_FILE_EMPTY
 * (12) ERROR_FILE_INVALID
 * (20) ERROR_USER_MAX_FILES_PER_HOUR_REACHED
 * (21) ERROR_USER_MAX_FILES_PER_DAY_REACHED
 * (22) ERROR_USER_MAX_BYTES_PER_HOUR_REACHED
 * (23) ERROR_USER_MAX_BYTES_PER_DAY_REACHED
 * (30) ERROR_FILE_DISALLOWED_TYPE
 * (31) ERROR_FILE_SIZE_EXCEEDED
 * (32) ERROR_FILE_BANNED
 * (40) STATUS_ERROR_SYSTEM_FAILURE

--------------------------------------------------------------------------------


INFO

You can send us a GET request to grab info about a file. We respond with a JSON
array.
Hint: Use the "status" key (true/false) if you want to check if a file exists.
Also, if the requested file does not exist, the response will be sent as a 404.

The URL format is:

https://api.bayfiles.com/v2/file/{id}/info


EXAMPLE REQUEST

https://api.bayfiles.com/v2/file/u1C0ebc4b0/info


INFO RESPONSE

{
    "status": true,
    "data": {
        "file": {
            "url": {
                "full": "https://bayfiles.com/u1C0ebc4b0/file.txt",
                "short": "https://bayfiles.com/u1C0ebc4b0"
            },
            "metadata": {
                "id": "u1C0ebc4b0",
                "name": "file.txt",
                "size": {
                    "bytes": 6861,
                    "readable": "6.7 KB"
                }
            }
        }
    }
}


INFO ERROR RESPONSE

{
    "status": false,
    "error": {
        "message": "The file you are looking for does not exist.",
        "type": "FILE_NOT_FOUND",
        "code": 404
    }
}



--------------------------------------------------------------------------------

Terms of Use - API - FAQ - Feedback - REPORT ABUSE

Visit our friends: Openload