Detailed docs & examples
Query: /api/shorten?api=<API_KEY>&url=<LONG_URL> Header: x-api-key: <API_KEY>
GET https://sahi.to/api/shorten?api=<API_KEY>&url=<LONG_URL>
-> {"status":"success","shortenedUrl":"https://sahi.to/abc123"}POST https://sahi.to/api/shorten
Headers: x-api-key: <API_KEY>
Body: { "urls": ["https://a.com","https://b.com"] }<script src="https://sahi.to/sdk.js"></script>
<script>
SahiURL.init({ key: "<API_KEY>", selector: "a" });
</script>JSON: {"status":"success","shortenedUrl":"https://sahi.to/abc123"}
TEXT: https://sahi.to/abc123{"status":"error","message":"Alias already taken"}