{"name":"BCX Public API","version":"v1","base":"https://api.bcx.lol","authentication":"none","notes":["Anonym nutzbar mit Rate-Limits pro IP.","Missbrauch (Brute-Force, Scanner-Pfade) führt zu IP-Sperren.","Gast-Limits: max. 30 Tage Gültigkeit, kein Unlimited.","Short Code-Länge über API: 4–12 (Länge 3 nur in der Short-UI).","File Code-Länge über API: 4–12 (Länge 3 nur in der File-UI).","File Share: Datei per POST /v1/file/upload (Rohbody) hochladen, dann Share erstellen. /v1/file/upload-url bleibt fuer direkte Storage-PUTs."],"endpoints":[{"method":"GET","path":"/v1/ip","description":"What's-my-IP: eigene IP + Geo/ISP + Trust-Report; optional ?ip= für Lookup","query":{"ip":"optional, IPv4/IPv6 einer anderen Adresse"},"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":"Kurzlink erstellen (inkl. Advanced-Optionen)","body":{"url":"https://example.com (required; alias: targetUrl)","codeLength":"4–12 (optional, default 5)","validHours":"1–720 für Gäste (optional, default 24)","maxUses":"1–999 oder null (optional)","minTrustScore":"0–100 oder null. Trust-Gate (optional)","allowedCountries":"[\"CH\",\"DE\"] ISO-2 Allowlist, leer = weltweit (optional)","stickyIpPass":"boolean. Erneut von derselben IP zählt nicht gegen 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 eines Kurzlinks (stark rate-limited; ohne targetUrl)"},{"method":"POST","path":"/v1/file/upload","description":"Datei hochladen (Rohbody). Danach POST /v1/file mit 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":"Signierte Upload-URL holen (danach PUT der Datei auf signedUrl). Fuer neue Clients POST /v1/file/upload verwenden.","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":"File-Share erstellen nach Upload (Gast-Limits, Advanced-Optionen)","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 für Gäste (optional, default 168/7d; alias: validHours)","maxDownloads":"1–999 oder null (optional)","password":"optional","minTrustScore":"0–100 oder 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 eines File-Shares (Meta bei Passwort redacted; stark rate-limited)"}],"links":{"shortenerUi":"https://short.bcx.lol","goPattern":"https://go.bcx.lol/{code}","fileShareUi":"http://file.bcx.lol","fileSharePattern":"http://file.bcx.lol/{code}","ipToolUi":"https://ip.bcx.lol"}}