{"name":"BCX Public API","version":"v1","base":"https://api.bcx.lol","authentication":"none","notes":["Usable anonymously, with rate limits per IP.","Abuse (brute force, scanner paths) leads to IP bans.","Guest limits: max. 30 days validity, no unlimited.","Short code length via API: 4–12 (length 3 only in the Short UI).","File code length via API: 4–12 (length 3 only in the File UI).","File Share: upload the file via POST /v1/file/upload (raw body), then create the share. /v1/file/upload-url remains for direct storage PUTs."],"endpoints":[{"method":"GET","path":"/v1/ip","description":"What's my IP: your own IP + geo/ISP + trust report; optional ?ip= for a lookup","query":{"ip":"optional, IPv4/IPv6 of another address"},"example":{"curl":"curl https://api.bcx.lol/v1/ip","curlOther":"curl \"https://api.bcx.lol/v1/ip?ip=1.1.1.1\""}},{"method":"POST","path":"/v1/short","description":"Create a short link (incl. advanced options)","body":{"url":"https://example.com (required; alias: targetUrl)","codeLength":"4–12 (optional, default 5)","validHours":"1–720 for guests (optional, default 24)","maxUses":"1–999 or null (optional)","minTrustScore":"0–100 or null. Trust gate (optional)","allowedCountries":"[\"CH\",\"DE\"] ISO-2 allowlist, empty = worldwide (optional)","stickyIpPass":"boolean. Repeat visits from the same IP do not count against maxUses (optional, default true)"},"example":{"curl":"curl -X POST https://api.bcx.lol/v1/short -H \"Content-Type: application/json\" -d '{\"url\":\"https://example.com\",\"validHours\":24,\"maxUses\":10,\"minTrustScore\":45,\"allowedCountries\":[\"CH\"],\"stickyIpPass\":true}'"}},{"method":"GET","path":"/v1/short/{code}","description":"Status of a short link (heavily rate-limited; without targetUrl)"},{"method":"POST","path":"/v1/file/upload","description":"Upload a file (raw body). Then POST /v1/file with storagePath.","headers":{"Content-Type":"application/octet-stream","X-BCX-Filename":"encodeURIComponent(dateiname.pdf)","X-BCX-Mime":"application/pdf (optional)","Content-Length":"byte length"},"example":{"curl":"curl -X POST https://api.bcx.lol/v1/file/upload -H \"Content-Type: application/octet-stream\" -H \"X-BCX-Filename: report.pdf\" -H \"X-BCX-Mime: application/pdf\" --data-binary @report.pdf"}},{"method":"POST","path":"/v1/file/upload-url","description":"Get a signed upload URL (then PUT the file to signedUrl). New clients should use POST /v1/file/upload.","body":{"filename":"report.pdf (required)","sizeBytes":"number (required)"},"example":{"curl":"curl -X POST https://api.bcx.lol/v1/file/upload-url -H \"Content-Type: application/json\" -d '{\"filename\":\"report.pdf\",\"sizeBytes\":12345}'"}},{"method":"POST","path":"/v1/file","description":"Create a file share after upload (guest limits, advanced options)","body":{"storagePath":"from /v1/file/upload or upload-url (required, first part)","partPaths":"optional string[] of every object path when the file is split (max 50 MB each)","filename":"report.pdf (required)","sizeBytes":"number (required)","mimeType":"optional","entries":"[{\"name\":\"a.pdf\",\"sizeBytes\":100}] optional manifest","codeLength":"4–12 (optional, default 5)","expiresInHours":"1–720 for guests (optional, default 168/7d; alias: validHours)","maxDownloads":"1–999 or null (optional)","password":"optional","minTrustScore":"0–100 or null (optional)","allowedCountries":"[\"CH\",\"DE\"] optional","stickyIpPass":"boolean (optional, default true)"},"example":{"curl":"curl -X POST https://api.bcx.lol/v1/file -H \"Content-Type: application/json\" -d '{\"storagePath\":\"UUID/report.pdf\",\"filename\":\"report.pdf\",\"sizeBytes\":12345,\"expiresInHours\":168,\"maxDownloads\":5}'"}},{"method":"GET","path":"/v1/file/{code}","description":"Status of a file share (meta redacted when password-protected; heavily rate-limited)"}],"links":{"shortenerUi":"https://short.bcx.lol","goPattern":"https://go.bcx.lol/{code}","fileShareUi":"https://file.bcx.lol","fileSharePattern":"https://file.bcx.lol/{code}","ipToolUi":"https://ip.bcx.lol"}}