{"openapi":"3.0.3","info":{"title":"san.st URL Shortener API","version":"1.0.0","description":"Privacy-first URL shortening with DLUS dual-layer safety scanning.","contact":{"url":"https://san.st"}},"servers":[{"url":"https://api.san.st","description":"Production"}],"paths":{"/api/shorten":{"post":{"operationId":"shortenUrl","summary":"Shorten a URL","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"alias":{"type":"string","maxLength":40}}},"example":{"url":"https://example.com/very/long/path","alias":"my-link"}}}},"responses":{"200":{"description":"Short link created"},"400":{"description":"Missing or invalid url"},"500":{"description":"Server error"}}}},"/api/alias":{"put":{"operationId":"setAlias","summary":"Set a custom alias","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","alias"],"properties":{"code":{"type":"string"},"alias":{"type":"string"}}}}}},"responses":{"200":{"description":"Alias set"},"400":{"description":"Invalid parameters"},"409":{"description":"Alias taken or reserved"}}}},"/api/check":{"get":{"operationId":"checkUrl","summary":"Check URL safety (DLUS)","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Safety check result"},"400":{"description":"Missing url"}}}},"/api/stats":{"get":{"operationId":"getSiteStats","summary":"Site-wide statistics","responses":{"200":{"description":"Site statistics"}}}},"/api/v1/links":{"post":{"operationId":"shortenUrlV1","summary":"Shorten a URL with ARLMP-22 metadata (public)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["destination"],"properties":{"destination":{"type":"string","format":"uri"}}},"example":{"destination":"https://example.com"}}}},"responses":{"201":{"description":"Short link created with ARLMP-22 metadata"},"400":{"description":"Missing or invalid destination"}}}},"/api/v1/links/{id}/metadata":{"get":{"operationId":"getLinkMetadata","summary":"Get ARLMP-22 metadata (public)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ARLMP-22 metadata object"},"404":{"description":"Link not found"}}}},"/{code}/stats":{"get":{"operationId":"getLinkStats","summary":"Per-link statistics","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Link statistics"},"404":{"description":"Not found"}}}},"/{code}":{"get":{"operationId":"redirectLink","summary":"Redirect short link","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect"},"404":{"description":"Not found"}}}}}}