Upload API Documentation

Learn how to upload files using our API

Endpoint: /files/

POSTUpload files to E-Z.host
Auth Required

Headers

NameValueDescription
keyYOUR_API_KEYYour API key for authentication.

Request Body

Form Data:

ParameterTypeDescription
fileFileThe file to upload

Example Requests

bash
curl -X POST 'https://api.e-z.host/files' \
  -H 'key: YOUR_API_KEY' \
  -F 'file=@/path/to/file'

Response

Successful response example:

json
{
  "success": true,
  "message": "File Uploaded",
  "fileUrl": "https://i.e-z.gg/xyz123.png",
  "deletionUrl": "https://i.e-z.gg/delete?key=random-deletion-key"
}

Error Handling

Possible error responses include:

  • 400 Bad Request: Missing file or invalid file format.
  • 401 Unauthorized: Invalid API key.
  • 413 Payload Too Large: File size exceeds the limit.
  • 429 Too Many Requests: Rate limit exceeded.

Need Help?

If you need assistance with our API, feel free to: