{"openapi":"3.1.0","info":{"title":"Anonym.es link API","version":"1.0","description":"Create, read, edit and delete anonymous short links.\n\nAuthentication: Authorization: Bearer <token> (or X-API-Key). An account token (anon_...) manages every link of the account with the plan's rights; the 32-character link token returned with each created link manages that link only, with Free rights. Creating links needs no token.\n\nErrors: an HTTP status plus {\"ok\":false,\"error\":code,\"message\":text,\"field\":name|null}. Rate limits: every call costs units against the plan's budget per minute (x-plans); X-RateLimit-Limit / -Remaining / -Reset on every response, 429 with Retry-After past the budget; within any 10 seconds at most a quarter of the minute budget, minimum 20 units.\n\nCustom names: pattern ^[a-zA-Z0-9_-]{3,32}$, shortest name 5 (Free) / 3 (paid). Route names, language codes and service words are reserved; brand names and offensive words are refused (a word list plus an automated review). A taken name answers 409 with free alternatives in suggest. A subdomain name (sub=true) is one DNS label: letters, digits and hyphens, no hyphen at either end, no underscore; www, mail, ns1 and similar names are reserved.\n\nQR codes in HTML: GET /api/v1/qr?short=<address> needs no token and can be used as an <img> src; GET /api/v1/links/{id}/qr needs a token and suits server-side code."},"servers":[{"url":"http://anonym.es"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An account token (anon_...) from the dashboard, or the 32-character token of one link, returned when the link was created."}},"schemas":{"Link":{"type":"object","description":"A short link. Timestamps are ISO 8601 in UTC; clicks and uniques cover the whole life of the link.","properties":{"id":{"type":"integer","description":"The id used by the other calls."},"short":{"type":"string","description":"The short address to share.","format":"uri"},"url":{"type":["string","null"],"description":"The destination; null for a note-only link."},"status":{"type":"string","description":"active | expired | exhausted (visit cap reached) | flagged (destination on a safety list) | banned.","enum":["active","expired","exhausted","flagged","banned"]},"password":{"type":"boolean","description":"Visitors must enter a password."},"created_at":{"type":"string","description":"ISO 8601, UTC.","format":"date-time"},"expires_at":{"type":["string","null"],"description":"When the link expires; null = no expiry."},"max_hits":{"type":["integer","null"],"description":"Visit cap; null = no cap."},"self_destruct":{"type":"boolean","description":"The link deletes itself, for good, when the cap or the lifetime is reached."},"delay":{"type":["integer","null"],"description":"Seconds on the forwarding page; null = the plan default, 0 = instant."},"no_countdown":{"type":"boolean","description":"The forwarding page shows no countdown and waits for a click on the address."},"adult":{"type":"boolean","description":"Visitors confirm being 18 or older before the forwarding page."},"note":{"type":["string","null"],"description":"Text shown on the forwarding page."},"tags":{"type":"array","items":{"type":"string"},"description":"Tags, lowercase."},"clicks":{"type":"integer","description":"Visits, whole life."},"uniques":{"type":"integer","description":"Unique visitors (one per address per day), whole life."}},"required":["id","short","url","status","password","created_at","clicks","uniques"],"example":{"id":4821,"short":"http://anonym.es/k7m2q","url":"https://example.com/page","status":"active","password":false,"created_at":"2026-09-05T14:02:11Z","expires_at":null,"max_hits":null,"self_destruct":false,"delay":null,"no_countdown":false,"adult":false,"note":null,"tags":[],"clicks":0,"uniques":0}},"QrImage":{"type":"object","properties":{"format":{"type":"string","description":"png or svg.","enum":["png","svg"]},"mime":{"type":"string","description":"image/png or image/svg+xml."},"size":{"type":"integer","description":"Requested side in pixels."},"logo":{"type":"boolean","description":"Logo drawn in the center."},"base64":{"type":"string","description":"The image, base64-encoded."}},"example":{"format":"png","mime":"image/png","size":300,"logo":true,"base64":"iVBORw0KGgoAAAANSUhEUgAA..."}},"Stats":{"type":"object","description":"Visits report: 30 days, 26 ISO weeks or 24 months.","properties":{"mode":{"type":"string","description":"day | week | month.","enum":["day","week","month"]},"from":{"type":"string","description":"First day, YYYY-MM-DD."},"to":{"type":"string","description":"Last day, YYYY-MM-DD."},"series":{"type":"array","description":"One entry per bucket, oldest first: [from, to, visits, uniques].","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"},{"type":"integer"},{"type":"integer"}]}},"summary":{"type":"object","description":"cur (current bucket), prev (previous), avg (average of the buckets before the current one), each with hits and uniq."},"dims":{"type":"object","description":"Breakdown for the range: ref, country, device, os, browser, hour; each a list of [value, visits]."}},"example":{"mode":"day","from":"2026-08-07","to":"2026-09-05","series":[["2026-08-07","2026-08-07",12,9],["2026-08-08","2026-08-08",3,3]],"summary":{"cur":{"from":"2026-09-05","to":"2026-09-05","hits":5,"uniq":4},"prev":{"from":"2026-09-04","to":"2026-09-04","hits":8,"uniq":6},"avg":{"n":7,"hits":6,"uniq":5}},"dims":{"ref":[["https://example.org/forum/thread-1",20],["direct",7]],"country":[["DE",15],["US",12]],"device":[["desktop",18],["mobile",9]],"os":[["Windows",11]],"browser":[["Chrome",16]],"hour":[["9",4],["14",6]]}}},"Error":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","description":"Error code, see the list in the description.","enum":["bad_request","bad_url","blocked","bad_name","dirty","brand","reserved","too_short","sub_format","sub_main","name_batch","taken","note_long","note_required","bad_tag","pro_only","max_only","account_only","limit","domain_limit","ai_limit","rate_limited","busy","auth","not_found","no_route","method","fetch","qr_unavailable"]},"message":{"type":"string","description":"The reason in words."},"field":{"type":["string","null"],"description":"The parameter the error refers to, or null for the request as a whole."},"suggest":{"type":"array","items":{"type":"string"},"description":"Free alternatives, on error taken."},"upgrade":{"type":"string","description":"Address of the pricing page, on pro_only / max_only / account_only."},"wait":{"type":"integer","description":"Minutes to wait, on ai_limit."},"retry_after":{"type":"integer","description":"Seconds to wait, on rate_limited / busy."}},"required":["ok","error","message","field"],"example":{"ok":false,"error":"taken","message":"This name is already taken.","field":"name","suggest":["promo-26","my-promo","promo-link"]}},"CreateRequest":{"type":"object","description":"Send url for one link, or urls for a batch (up to 50 addresses: a JSON array, or one address per line in a string). Every other field is optional; paid options are ignored for guests and on the Free plan.","properties":{"url":{"type":"string","description":"The destination (one link).","format":"uri","maxLength":2048},"urls":{"description":"Several destinations, each becomes its own link with its own token. A JSON array or a string with one address per line; at most 50.","oneOf":[{"type":"array","items":{"type":"string","format":"uri"},"maxItems":50},{"type":"string"}]},"name":{"type":"string","description":"Custom name for a single link; see the name rules (x-name-rules).","pattern":"^[a-zA-Z0-9_-]{3,32}$"},"domain":{"type":"string","description":"One of the alias domains, random, or random-alias (random among the alias domains only). Paid plans; default is random: links never sit on the main domain. Free and guests: anonymes.click."},"sub":{"type":"boolean","description":"Make it name.alias instead of alias/name. Max plan, alias domains only."},"expires_days":{"type":"integer","description":"Lifetime in days. Paid plans.","minimum":1},"max_hits":{"type":"integer","description":"Visit cap. Paid plans.","minimum":1},"self_destruct":{"type":"boolean","description":"Delete the link for good when the visit cap or the lifetime is reached (needs max_hits or expires_days)."},"password":{"type":"string","description":"Password visitors must enter. Paid plans."},"note":{"type":"string","description":"Text shown on the forwarding page. Paid plans; length by plan (note_max)."},"note_only":{"type":"boolean","description":"The link opens the note itself, no destination. Pro+ and up."},"delay":{"type":"integer","description":"Seconds on the forwarding page, 0 = instant. Paid plans.","minimum":0,"maximum":3600},"no_countdown":{"type":"boolean","description":"No countdown on the forwarding page: no timer, no automatic forward, the visitor clicks the address. Paid plans."},"adult":{"type":"boolean","description":"Adult content (18+): visitors confirm their age on a page of its own before anything else is shown. Every plan."},"tags":{"type":"string","description":"Comma-separated tags, up to 5 of 24 characters. Account tokens on paid plans."},"qr":{"type":"boolean","description":"Include the QR code (base64) in the response."},"qr_size":{"type":"integer","description":"Side in pixels.","minimum":100,"maximum":1000,"default":300},"qr_format":{"type":"string","description":"png (default) or svg.","enum":["png","svg"]},"qr_logo":{"type":"boolean","description":"false = no logo; paid plans only, otherwise ignored."}},"examples":[{"url":"https://example.com/page"},{"url":"https://example.com/page","name":"my-article","expires_days":30,"max_hits":1000,"password":"secret","tags":"blog,promo","qr":true},{"urls":["https://example.com/a","https://example.com/b","https://example.com/c"]}]},"PatchRequest":{"type":"object","description":"Only the fields sent change. Clearing: strings (password, note, tags) are cleared with \"\"; expires_days and max_hits are cleared with null, \"\" or 0 (no expiry, no cap; self_destruct turns off when neither is left); delay: null or \"\" = the plan default, 0 = instant. url cannot be emptied.","properties":{"url":{"type":"string","description":"New destination. Pro+ and up.","format":"uri"},"name":{"type":"string","description":"New name; same rules as a custom name."},"expires_days":{"type":["integer","string","null"],"description":"New lifetime in days; null, \"\" or 0 removes the expiry."},"max_hits":{"type":["integer","string","null"],"description":"New visit cap; null, \"\" or 0 removes the cap (self_destruct stays only while a lifetime remains)."},"self_destruct":{"type":"boolean","description":"Delete for good when the cap or the lifetime is reached; false turns it off."},"password":{"type":"string","description":"New password; \"\" removes the password."},"note":{"type":"string","description":"New note; \"\" removes it (a note-only link keeps needing one)."},"delay":{"type":["integer","string","null"],"description":"Seconds on the forwarding page; null or \"\" = the plan default, 0 = instant."},"no_countdown":{"type":"boolean","description":"true = no countdown on the forwarding page; false turns the countdown back on."},"adult":{"type":"boolean","description":"true = age confirmation (18+) before the forwarding page; false removes it."},"tags":{"type":"string","description":"New comma-separated tag list; \"\" removes all tags."}},"example":{"max_hits":2000,"delay":3,"tags":"blog,updated"}},"LinkResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"link":{"$ref":"#/components/schemas/Link"},"qr":{"$ref":"#/components/schemas/QrImage"},"stats":{"$ref":"#/components/schemas/Stats"}},"required":["ok","link"],"example":{"ok":true,"link":{"id":4821,"short":"http://anonym.es/k7m2q","url":"https://example.com/page","status":"active","password":false,"created_at":"2026-09-05T14:02:11Z","expires_at":null,"max_hits":null,"self_destruct":false,"delay":null,"no_countdown":false,"adult":false,"note":null,"tags":[],"clicks":0,"uniques":0}}},"CreateResponse":{"type":"object","description":"One link created.","properties":{"ok":{"type":"boolean","const":true},"link":{"$ref":"#/components/schemas/Link"},"token":{"type":"string","description":"The link token (32 characters): manages this link."},"left":{"type":["integer","null"],"description":"Links still available in the current quota period; null = unlimited."},"qr":{"$ref":"#/components/schemas/QrImage"}},"required":["ok","link","token","left"],"example":{"ok":true,"link":{"id":4821,"short":"http://anonym.es/k7m2q","url":"https://example.com/page","status":"active","password":false,"created_at":"2026-09-05T14:02:11Z","expires_at":null,"max_hits":null,"self_destruct":false,"delay":null,"no_countdown":false,"adult":false,"note":null,"tags":[],"clicks":0,"uniques":0},"token":"3f9c1b7e2d4a4c0e9b8f7a6d5c4b3a21","left":4}},"BatchResponse":{"type":"object","description":"Several addresses were sent: one result per address, in the order sent.","properties":{"ok":{"type":"boolean","const":true},"batch":{"type":"boolean","const":true},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"link":{"$ref":"#/components/schemas/Link"},"token":{"type":"string"},"qr":{"$ref":"#/components/schemas/QrImage"}},"required":["ok","link","token"]},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"url":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"field":{"type":["string","null"]}},"required":["ok","url","error"]}]}},"left":{"type":["integer","null"],"description":"Links still available after the batch."}},"required":["ok","batch","results","left"],"example":{"ok":true,"batch":true,"results":[{"ok":true,"link":{"id":4821,"short":"http://anonym.es/k7m2q","url":"https://example.com/page","status":"active","password":false,"created_at":"2026-09-05T14:02:11Z","expires_at":null,"max_hits":null,"self_destruct":false,"delay":null,"no_countdown":false,"adult":false,"note":null,"tags":[],"clicks":0,"uniques":0},"token":"3f9c1b7e2d4a4c0e9b8f7a6d5c4b3a21"},{"ok":false,"url":"https://not a url","error":"bad_url","message":"The address is missing or is not a valid http(s) URL.","field":"url"}],"left":3}},"ListResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"page":{"type":"integer"},"per":{"type":"integer"},"total":{"type":"integer"},"pages":{"type":"integer"},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"},"description":"Newest first."}},"required":["ok","page","per","total","pages","links"],"example":{"ok":true,"page":1,"per":50,"total":1,"pages":1,"links":[{"id":4821,"short":"http://anonym.es/k7m2q","url":"https://example.com/page","status":"active","password":false,"created_at":"2026-09-05T14:02:11Z","expires_at":null,"max_hits":null,"self_destruct":false,"delay":null,"no_countdown":false,"adult":false,"note":null,"tags":[],"clicks":0,"uniques":0}]}},"CheckResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"available":{"type":"boolean"},"name":{"type":"string"},"error":{"type":"string","description":"Why the name is not available (taken, reserved, too_short, bad_name, brand, sub_format, sub_main); absent when available."},"message":{"type":"string"},"field":{"type":"string"},"suggest":{"type":"array","items":{"type":"string"},"description":"Free alternatives when taken."}},"required":["ok","available","name"],"examples":[{"ok":true,"available":true,"name":"my-article"},{"ok":true,"available":false,"name":"promo","error":"taken","message":"This name is already taken.","field":"name","suggest":["promo-26","my-promo","promo-link"]}]},"DeleteResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"deleted":{"type":"integer","description":"The id of the deleted link."}},"required":["ok","deleted"],"example":{"ok":true,"deleted":4821}},"MeResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"login":{"type":"string"},"plan":{"type":"string","description":"Plan key.","enum":["free","pro","pro_plus","max","enterprise"]},"plan_label":{"type":"string"},"until":{"type":["string","null"],"description":"When the paid plan ends; null on Free or without an end date."},"limits":{"type":"object","properties":{"links":{"type":"integer"},"per":{"type":"string","enum":["day","month"]},"ai_hourly":{"type":"integer"},"name_min":{"type":"integer"},"note_max":{"type":"integer"},"api_units":{"type":"integer"}}},"left":{"type":["integer","null"],"description":"Links still available in the current quota period."},"aliases":{"type":"array","items":{"type":"string"},"description":"Alias domains the plan may use."},"can":{"type":"object","additionalProperties":{"type":"boolean"},"description":"password, ttl, edit, edit_url, tags, note, note_only, alias, sub, instant, qr_no_logo."}},"required":["ok","login","plan","limits","left","aliases","can"],"example":{"ok":true,"login":"alice","plan":"pro","plan_label":"Pro","until":"2026-12-31T00:00:00Z","limits":{"links":500,"per":"month","ai_hourly":10,"name_min":3,"note_max":300,"api_units":150},"left":412,"aliases":["anon.skin"],"can":{"password":true,"ttl":true,"edit":true,"edit_url":false,"tags":true,"note":true,"note_only":false,"alias":true,"sub":false,"instant":true,"qr_no_logo":true}}},"IndexResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"api":{"type":"string"},"version":{"type":"string"},"docs":{"type":"string"},"openapi":{"type":"string"}},"example":{"ok":true,"api":"Anonym.es link API","version":"1","docs":"http://anonym.es/api","openapi":"http://anonym.es/api/v1/openapi.json"}}}},"paths":{"/api/v1":{"get":{"summary":"About this API: version, documentation and schema addresses.","description":"Cost: 1 unit(s).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexResponse"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/links":{"post":{"summary":"Create a link, or up to 50 at once. Without a token: as a guest, on the Free quota. Returns the link with its token.","description":"Cost: 5 unit(s) + 1 per address.","responses":{"201":{"description":"Created: one link, or a batch with one result per address.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateResponse"},{"$ref":"#/components/schemas/BatchResponse"}]}}}},"400":{"description":"Validation error (bad_url, bad_name, note_long, bad_tag, name_batch, ...).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"A paid option on the Free plan (pro_only, max_only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The custom name is taken; suggest lists free alternatives.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"PNG requested on a server without image support (qr_unavailable); request svg.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CreateRequest"}}}}},"get":{"summary":"The account's links, newest first.","description":"Cost: 2 unit(s).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such link, or not one of yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"A link token was sent where an account token is needed (account_only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number (default 1).","schema":{"type":"integer"}},{"name":"per","in":"query","required":false,"description":"Links per page, 1-100 (default 50).","schema":{"type":"integer"}},{"name":"q","in":"query","required":false,"description":"Search in the short name, domain and destination (one flat list, up to 50).","schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"description":"Only links with this tag.","schema":{"type":"string"}}]}},"/api/v1/names/check":{"get":{"summary":"Is this custom name available? Suggestions when it is taken.","description":"Cost: 2 unit(s).","responses":{"200":{"description":"Available or not (with the reason and suggestions).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckResponse"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"name","in":"query","required":true,"description":"The name to check.","schema":{"type":"string"}},{"name":"domain","in":"query","required":false,"description":"Alias domain, random or random-alias (paid plans).","schema":{"type":"string"}},{"name":"sub","in":"query","required":false,"description":"Check as a subdomain name (Max).","schema":{"type":"boolean"}}]}},"/api/v1/links/lookup":{"get":{"summary":"Find one of your links by its short address.","description":"Cost: 1 unit(s).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such link, or not one of yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearer":[]}],"parameters":[{"name":"short","in":"query","required":true,"description":"The short address, for example https://anonym.es/abc12.","schema":{"type":"string"}}]}},"/api/v1/links/{id}":{"get":{"summary":"One link: settings, status, clicks and unique visitors for its whole life. Account tokens may add a statistics report.","description":"Cost: 1 unit(s).","responses":{"200":{"description":"OK. qr and stats are present only when requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such link, or not one of yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"stats","in":"query","required":false,"description":"day | week | month: add the visits report for the last 30 days / 26 weeks / 24 months (account tokens).","schema":{"type":"string"}},{"name":"qr","in":"query","required":false,"description":"Include the QR code of the short address (base64) in the response.","schema":{"type":"boolean"}},{"name":"qr_size","in":"query","required":false,"description":"Side of the QR image in pixels, 100-1000 (default 300; PNG rounds down to whole modules).","schema":{"type":"integer"}},{"name":"qr_format","in":"query","required":false,"description":"png (default) or svg.","schema":{"type":"string"}},{"name":"qr_logo","in":"query","required":false,"description":"false = plain code without the logo; paid plans only, otherwise ignored.","schema":{"type":"boolean"}}]},"patch":{"summary":"Change settings. Only the fields sent change. Paid plans (a link token has Free rights, so it cannot edit).","description":"Cost: 3 unit(s).","responses":{"200":{"description":"The link after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such link, or not one of yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Editing needs a paid plan (pro_only); a link token has Free rights.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The new name is taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchRequest"}}}}},"delete":{"summary":"Delete the link; the name becomes free again.","description":"Cost: 2 unit(s).","responses":{"200":{"description":"Deleted; the name is free again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such link, or not one of yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/api/v1/links/{id}/qr":{"get":{"summary":"The QR code of the short address as an image (PNG or SVG); needs a token, so it suits server-side use.","description":"Cost: 3 unit(s).","responses":{"200":{"description":"The image (PNG or SVG).","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/svg+xml":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such link, or not one of yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"PNG requested on a server without image support (qr_unavailable); request svg.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"qr_size","in":"query","required":false,"description":"Side of the QR image in pixels, 100-1000 (default 300; PNG rounds down to whole modules).","schema":{"type":"integer"}},{"name":"qr_format","in":"query","required":false,"description":"png (default) or svg.","schema":{"type":"string"}},{"name":"qr_logo","in":"query","required":false,"description":"false = plain code without the logo; paid plans only, otherwise ignored.","schema":{"type":"boolean"}}]}},"/api/v1/qr":{"get":{"summary":"The QR code of a short address as an image, without a token: the address itself is the key. Made for <img> tags.","description":"Cost: 3 unit(s).","responses":{"200":{"description":"The image (PNG or SVG).","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/svg+xml":{"schema":{"type":"string"}}}},"501":{"description":"PNG requested on a server without image support (qr_unavailable); request svg.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"short","in":"query","required":true,"description":"The short address, for example https://anonym.es/abc12.","schema":{"type":"string"}},{"name":"qr_size","in":"query","required":false,"description":"Side of the QR image in pixels, 100-1000 (default 300; PNG rounds down to whole modules).","schema":{"type":"integer"}},{"name":"qr_format","in":"query","required":false,"description":"png (default) or svg.","schema":{"type":"string"}},{"name":"qr_logo","in":"query","required":false,"description":"false = plain code without the logo; paid plans only, otherwise ignored.","schema":{"type":"boolean"}}]}},"/api/v1/me":{"get":{"summary":"The account: plan, limits, quota left, alias domains, what the plan allows.","description":"Cost: 1 unit(s).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such link, or not one of yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"A link token was sent where an account token is needed (account_only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearer":[]}]}},"/api/v1/openapi.json":{"get":{"summary":"This API as an OpenAPI 3.1 document.","description":"Cost: 1 unit(s).","responses":{"200":{"description":"This document.","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Rate limit, creation quota or too many creations in flight; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"x-plans":{"free":{"label":"Free","links":5,"per":"day","custom_names_per_hour":5,"name_min":5,"note_max":0,"api_units_per_minute":60,"create_slots":2,"options":[]},"pro":{"label":"Pro","links":500,"per":"month","custom_names_per_hour":10,"name_min":3,"note_max":300,"api_units_per_minute":150,"create_slots":2,"options":["password","ttl","edit","tags","note","alias","instant","qr_no_logo"]},"pro_plus":{"label":"Pro+","links":2000,"per":"month","custom_names_per_hour":50,"name_min":3,"note_max":2000,"api_units_per_minute":400,"create_slots":2,"options":["password","ttl","edit","edit_url","tags","note","note_only","alias","instant","qr_no_logo"]},"max":{"label":"Max","links":50000,"per":"month","custom_names_per_hour":200,"name_min":3,"note_max":5000,"api_units_per_minute":1000,"create_slots":4,"options":["password","ttl","edit","edit_url","tags","note","note_only","alias","sub","instant","qr_no_logo"]},"enterprise":{"label":"Enterprise","links":0,"per":"month","custom_names_per_hour":0,"name_min":3,"note_max":5000,"api_units_per_minute":2500,"create_slots":4,"options":["password","ttl","edit","edit_url","tags","note","note_only","alias","sub","instant","qr_no_logo"]}},"x-name-rules":{"pattern":"^[a-zA-Z0-9_-]{3,32}$","min_length":{"free":5,"paid":3},"max_length":32,"case":"Names match case-insensitively: Promo and promo are the same link.","reserved":"Route names, language codes and service words are reserved; brand names and offensive words are refused (a word list plus an automated review).","taken":"A taken name answers 409 with free alternatives in suggest.","subdomain":"A subdomain name (sub=true) is one DNS label: letters, digits and hyphens, no hyphen at either end, no underscore; www, mail, ns1 and similar names are reserved."},"x-rate-limits":{"cost":{"read":1,"list":2,"qr":3,"check":2,"update":3,"delete":2,"create":5,"create_url":1,"me":1,"lookup":1,"index":1},"burst_share":"1/4 of the minute budget per 10 s, minimum 20","global_units_per_minute":3000,"create_slots":{"default":2,"max":4,"enterprise":4,"all":10}},"x-error-codes":{"bad_request":{"status":400,"message":"Malformed request.","field":null},"bad_url":{"status":400,"message":"The address is missing or is not a valid http(s) URL.","field":"url"},"blocked":{"status":400,"message":"This destination cannot be linked.","field":"url"},"bad_name":{"status":400,"message":"This name is not allowed.","field":"name"},"dirty":{"status":400,"message":"This name is not allowed.","field":"name"},"brand":{"status":400,"message":"This name looks like a brand name and cannot be used.","field":"name"},"reserved":{"status":400,"message":"This name is reserved.","field":"name"},"too_short":{"status":400,"message":"The name is too short for your plan.","field":"name"},"sub_format":{"status":400,"message":"A subdomain name is 3 to 32 letters, digits or hyphens.","field":"name"},"sub_main":{"status":400,"message":"Subdomain links exist on the alias domains only.","field":"domain"},"name_batch":{"status":400,"message":"A custom name works for a single address, not for a batch.","field":"name"},"taken":{"status":409,"message":"This name is already taken.","field":"name"},"note_long":{"status":400,"message":"The note is longer than your plan allows.","field":"note"},"note_required":{"status":400,"message":"A note-only link needs a note.","field":"note"},"bad_tag":{"status":400,"message":"Tags: up to 5 of them, each up to 24 characters.","field":"tags"},"pro_only":{"status":403,"message":"This option needs a paid plan.","field":null},"max_only":{"status":403,"message":"Subdomain links need the Max plan.","field":null},"account_only":{"status":403,"message":"This call needs an account token.","field":null},"limit":{"status":429,"message":"The link quota for this period is used up.","field":null},"domain_limit":{"status":429,"message":"Today's limit for links to this site without an account is used up.","field":"url"},"ai_limit":{"status":429,"message":"Too many custom names this hour; try again later.","field":"name"},"rate_limited":{"status":429,"message":"Too many requests; slow down.","field":null},"busy":{"status":429,"message":"Too many links being created at once; retry in a moment.","field":null},"auth":{"status":401,"message":"Missing or invalid token.","field":null},"not_found":{"status":404,"message":"No such link.","field":null},"no_route":{"status":404,"message":"No such endpoint.","field":null},"method":{"status":405,"message":"Method not allowed.","field":null},"fetch":{"status":500,"message":"Could not create the link; try again.","field":null},"qr_unavailable":{"status":501,"message":"PNG QR codes are not available on this server; request svg.","field":"qr_format"}}}