{{define "api.html"}}{{template "base" .}}{{end}} {{define "content"}}

Developer docs

Warpbox API

Anonymous uploads for curl, scripts, and ShareX. The upload endpoint accepts multipart files and returns either plain text or JSON based on the Accept header.

Curl upload

Without a JSON Accept header, Warpbox prints one plain box URL for shell-friendly usage.

curl -F file=@./report.pdf {{.Data.UploadURL}}

For automation, request JSON to get file URLs and the private manage/delete URLs.

curl -F file=@./report.pdf \
  -H 'Accept: application/json' \
  {{.Data.UploadURL}}

JSON response

The raw delete token is returned only once inside manageUrl and deleteUrl. Keep those links private.

{
  "boxId": "abc123",
  "boxUrl": "{{.Data.BaseURL}}/d/abc123",
  "zipUrl": "{{.Data.BaseURL}}/d/abc123/zip",
  "manageUrl": "{{.Data.BaseURL}}/d/abc123/manage/private-token",
  "deleteUrl": "{{.Data.BaseURL}}/d/abc123/manage/private-token/delete",
  "expiresAt": "2026-06-05T12:00:00Z",
  "files": [
    {
      "id": "file123",
      "name": "report.pdf",
      "size": "2.4 MiB",
      "url": "{{.Data.BaseURL}}/d/abc123/f/file123"
    }
  ]
}

ShareX setup

  1. Download the instance config: /api/v1/sharex/warpbox-anonymous.sxcu.
  2. Or open the tracked template at {{.Data.ShareXExamplePath}} and change RequestURL to {{.Data.ShareXExampleURL}}.
  3. Keep FileFormName as {{.Data.ShareXFileFieldName}}.
  4. Import the .sxcu file into ShareX as a custom uploader.
  5. Upload a file. ShareX will use boxUrl as the public URL and manageUrl as the deletion URL.
{
  "RequestMethod": "POST",
  "RequestURL": "{{.Data.ShareXExampleURL}}",
  "Headers": { "Accept": "application/json" },
  "Body": "MultipartFormData",
  "FileFormName": "{{.Data.ShareXFileFieldName}}",
  "URL": "$json:boxUrl$",
  "DeletionURL": "$json:manageUrl$"
}

Multipart fields

file

One or more files for curl, browser, and generic multipart clients.

sharex

One or more files from ShareX custom uploader configs.

max_days

Optional number of days before expiration. Defaults to 7.

expires_minutes

Optional lifetime in minutes. Takes precedence over max_days when greater than zero — useful for sub-day expiries (e.g. 60 for one hour).

max_downloads

Optional download count limit.

password

Optional password required before viewing/downloading.

obfuscate_metadata

Optional on; hides names/counts until unlock when a password is set.

{{end}}