Snapbyte
  1. Snapbyte APIs
Snapbyte
  • Snapbyte
  • Pricing
  • Speedtest
  • Snapbyte APIs
    • Basic
      • Signup
      • Authenticate
      • Logout
      • Get API Key
      • Add webhook
      • Get User Stats
    • Files
      • Top Files
      • Get Files
      • Get File Info
      • Get File's Stats
    • Zones
      • Get Zones
      • Create Zone
      • Get Zone's Stats
    • Domain
      • Whitelist Domain
      • Domain Patterns
    • Preload a File
      POST
    • Get Snapbyte Signed Url
      GET
  • Legacy APIs
    • Preload File
      POST
    • Get Download Url
      GET
  • ⚡ Fast Snap
    GET
  1. Snapbyte APIs

Preload a File

POST
/snap/preload
Pre-load a file to snapbyte cache system
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.snapbyte.io/snap/preload' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
    "file_id": "2220f3ce8a1a9a73bc9910d4180864e023371",
    "sign_url": "https://files.testfile.org/ZIPC/300MB-Corrupt-Testfile.Org.zip",
    "expires_at": 1851245022000,
    "file_name": "300MB-Corrupt-Testfile.Org.zip",
    "file_size": 314572800,
    "file_md5": "d4c746ddad05ea418131fca42f6bd5f6",
    "mime_type": "application/zip"
}'
Response Response Example
{
    "success": true,
    "message": "",
    "data": {
        "id": "5980853f-81e0-4257-bff2-465856d205de"
    }
}

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Body Params application/json
file_id
string 
required
A unique identifier that you define when uploading the file. This ID will be used later to retrieve or manage the cached file.
sign_url
string 
required
Direct download url of the target file
expires_at
number 
required
Expire time of the sign url in milliseconds (Unix timestamps)
file_name
string 
optional
File name
file_size
number 
optional
File size
file_md5
string 
optional
File MD5
mine_type
string 
optional
File Mine Type
Examples

Responses

🟢200Success
application/json
Body
data
object 
required
id
string 
required
Snapbyte File ID, You can save this file ID or ignore it and use your own file_id
Modified at 2025-07-15 09:11:40
Previous
Domain Patterns
Next
Get Snapbyte Signed Url
Built with