API Docs
Upload a file, shorten a URL, and manage your links from your own tools. No account or API token is required.
Base URL: https://wh.dog. Use HTTPS for every request. These endpoints work with scripts, desktop apps and server-side clients; cross-origin browser writes are not supported.
Save the managementKey or deletionUrl returned when you create a link. Anyone with either can delete it. Share only the public url.
Upload a file
/api/uploadSend multipart/form-data with one file. This works for images, GIFs, videos, text files and other file types.
file· required- The file to upload, up to 1 GiB (1,073,741,824 bytes).
suffix· optional- A custom link: 1–32 letters, digits, underscores or dashes. Codes are case-insensitive and returned in uppercase. Omit this field for a random 4-character code. Reserved or previously used codes cannot be reused.
curl --fail-with-body https://wh.dog/api/upload -F "file=@screenshot.png" -F "suffix=my-image"For text, save your text as a UTF-8 .txt file and upload it with the same endpoint. Let your HTTP client set the multipart boundary; do not manually set Content-Type when using -F.
Shorten a URL
/api/shortenSend JSON or multipart form data. The destination must be an absolute http:// or https:// URL.
url· required- The destination URL, up to 4,096 bytes.
suffix· optional- The same custom-link rules as file uploads.
curl --fail-with-body https://wh.dog/api/shorten -F "url=https://example.com/long/path"{
"url": "https://example.com/long/path",
"suffix": "my-link"
}On Windows PowerShell, use curl.exe if curl is an alias for another command.
Your new link
Both creation endpoints return 201 Created and a JSON object. Example values below are placeholders.
{
"code": "A8H0",
"path": "/A8H0.png",
"url": "https://wh.dog/A8H0.png",
"managementKey": "YOUR_MANAGEMENT_KEY",
"deletionUrl": "https://wh.dog/manage#A8H0:YOUR_MANAGEMENT_KEY"
}Use url exactly as returned. File URLs include the stored extension; the bare shortcode still redirects to that URL. Previewable files are served directly, while unsupported types show a file-details page. URL shortlinks redirect to their destinations.
The anonymous API does not associate links with a browser session. Keep the key in your own private storage; it cannot be retrieved from the public link later. Opening deletionUrl displays a confirmation page and does not delete anything by itself.
Delete a link or file
/api/linkSend JSON containing code and managementKey. Deletion revokes the shortlink, file URL and download URL.
{
"code": "A8H0",
"managementKey": "YOUR_MANAGEMENT_KEY"
}curl --fail-with-body -X DELETE https://wh.dog/api/link -H "Content-Type: application/json" --data-binary "@delete.json"200 means deletion completed. 202 means public access has already been removed and private archival is pending; treat this as a successful revocation. 404 means the link does not exist or has already been deleted. A rejected key returns 403.
Keep management keys out of query strings, public logs and shared URLs. The Privacy Notice explains private retention after deletion.
Limits & errors
Limits apply to the website and API together. Creation includes both uploads and URL shortening.
| Action | Per IP / hour | Site-wide / hour |
|---|---|---|
| Create | 30 | 350 |
| Delete | 60 | 600 |
| Report | 8 | 75 |
The service accepts up to 32 simultaneous creation requests, 12 GiB of active files, and 64 GiB of accepted file uploads per UTC day. Deleting a file does not refund that day's accepted bytes. Available disk space and pending archival can also limit uploads.
API errors normally return JSON with a message field. Check the HTTP status before reading a success response.
400- Invalid URL, fields or custom link.
403- Invalid management key or a disallowed cross-origin request.
409- The custom link is already taken.
413- The upload is too large or failed while being read.
415- Unsupported request content type.
429- Rate or concurrency limit reached. Respect
Retry-Afterwhen present and back off before retrying. 500 / 503- A storage or service operation could not complete. Avoid rapid retries.
507- Active, daily or available storage capacity has been reached.
Other endpoints
GET /api/stats returns {"totalLinks": 2}, with the current active-link count.
POST /api/report accepts JSON with shortcode and reason (up to 3,000 bytes). A 200 response confirms that the report was recorded.
GET /download/CODE downloads a file as an attachment with its filename. It is also revoked when the link is deleted.