⚠️ Important: Protect your API key. Do not share it publicly or commit it to version control.

📄 Overview

This API endpoint allows you to upload files using a secure, key-protected interface. All requests must be authenticated with a valid API key.

🛡️ API key is required!
Every upload request must include a valid access key in the code field. Keep your key secure and private.

🔗 Endpoint

All API requests should be sent to the following URL:

 https://api.shotafile.me/

Method: POST


📤 POST Parameters

ParameterTypeRequiredDescription
codestringYesYour unique API access key.
filefileYesThe file to be uploaded.

💻 HTML Form Example

<form action=" https://api.shotafile.me/" method="post" enctype="multipart/form-data">
  <input type="hidden" name="code" value="YOUR_API_KEY">
  <input type="file" name="file" required>
  <button type="submit">Upload</button>
</form>

🐘 PHP Upload Example

<?php
$ch = curl_init();
$cfile = new CURLFile('example.png', 'image/png', 'example.png');
$post = [
  'file' => $cfile,
  'code' => 'YOUR_API_KEY'
];

curl_setopt_array($ch, [
  CURLOPT_URL => " https://api.shotafile.me/",
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => $post,
  CURLOPT_RETURNTRANSFER => true
]);

$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>

📟 cURL Upload Example

curl -X POST -F "[email protected]" -F "code=YOUR_API_KEY"  https://api.shotafile.me/

✅ Success Response

A successful upload will return a JSON object with the file's URL.

{
  "success": true,
  "filename": "uploaded_file.png",
  "url": "https://files.shotafile.me/uploads/uploaded_file.png"
}

❌ Error Responses

If an error occurs, the API will return a JSON object with an error message.

{ "error": "Invalid or missing API key" }
{ "error": "No file uploaded" }
{ "error": "Upload failed: [reason]" }

💡 Tips & Notes


📜 Terms of Use & Abuse Policy

By using this API, you agree to the following rules:

Need support? Contact [email protected]