POST/api/upload

File Upload

Uploads a file and returns a shareable link. The request must be sent as multipart/form-data.

BODY PARAMETERS

Parameter Type Status Description
fileFileRequiredThe file to be uploaded.
expirystringOptionalExpiration time. Can be 5m, 1h, 1d, or permanent.

EXAMPLE (CURL)

curl -X POST "https://s.delirius.site/api/upload" \
  -F "file=@/path/to/your/file.png" \
  -F "expiry=1d"
GET/api/delete

Delete File

Deletes an uploaded file by its ID. If the file is permanent (expired < 1), a valid pin parameter is required.

QUERY PARAMETERS

Parameter Type Status Description
idstringRequiredFile ID or hash code returned when uploading the file.
pinstringOptionalRequired only for permanent files. Enter the 6-digit PIN assigned upon creation to delete it.

EXAMPLE (CURL)

curl -X GET "https://s.delirius.site/api/delete?id=abc123"

# Delete permanent file
curl -X GET "https://s.delirius.site/api/delete?id=FILE_ID&pin=YOUR_PIN"
POST/api/shorten

URL Shortener

Shortens a long URL. The request must be sent as application/json.

BODY PARAMETERS

Parameter Type Status Description
urlstringRequiredThe long URL to be shortened.

EXAMPLE (CURL)

curl -X POST "https://s.delirius.site/api/shorten" \
      --header "Content-Type: application/json" \
      --data-raw '{
        "url": "https://a-very-long-and-complex-url.com/example"
      }'