link.createdनया लिंक बनने पर सक्रिय होता है
आपके HTTPS endpoint पर रियल-टाइम event डिलीवरी।
Dashboard → Developer → Webhooks में एक सार्वजनिक HTTPS endpoint रजिस्टर करें। जब कोई subscribed event होता है तो s.id आपके URL पर signed JSON payload POST करेगा। विफल deliveries (non-2xx या timeout) को अधिकतम 3 बार, 0 सेकंड, 5 सेकंड और 30 सेकंड की देरी के साथ फिर से कोशिश की जाती है।
POST
JSON डिलीवरी
10s
प्रतिक्रिया समय-सीमा
2xx
सफल प्रतिक्रिया
उपलब्ध events
link.createdनया लिंक बनने पर सक्रिय होता है
link.updatedलिंक का URL या शीर्षक बदलने पर सक्रिय होता है
link.archivedलिंक संग्रहित होने पर सक्रिय होता है
link.clickedहर रीडायरेक्ट पर सक्रिय होता है (प्रति क्लिक इवेंट)
microsite.publishedMicrosite प्रकाशित होने पर सक्रिय होता है
qr.scannedQR कोड स्कैन होने पर सक्रिय होता है
प्रत्येक webhook POST में event name, संबंधित resource और UTC timestamp के साथ JSON body होती है।
{
"event": "link.created",
"link": {
"id": 123,
"short": "mylink",
"short_url": "https://s.id/mylink",
"long_url": "https://example.com/long-url",
"title": "My Link",
"created": "2026-06-22T10:00:00Z"
},
"timestamp": "2026-06-22T10:00:00Z"
}प्रत्येक delivery में X-SID-Signature: sha256=<hex> header शामिल है। अपने webhook secret का उपयोग करके raw request body का HMAC-SHA256 compute करें और timing-safe equality से compare करें।
const crypto = require('node:crypto');
function verifySignature(secret, rawBody, sigHeader) {
if (typeof sigHeader !== 'string' || !sigHeader.startsWith('sha256=')) {
return false;
}
const expected = 'sha256=' +
crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const receivedBuffer = Buffer.from(sigHeader, 'utf8');
const expectedBuffer = Buffer.from(expected, 'utf8');
return receivedBuffer.length === expectedBuffer.length &&
crypto.timingSafeEqual(receivedBuffer, expectedBuffer);
}func verifySignature(secret, body []byte, sig string) bool {
mac := hmac.New(sha256.New, secret)
mac.Write(body)
expected := "sha256=" + hex.EncodeToString(mac.Sum(nil))
return hmac.Equal([]byte(sig), []byte(expected))
}Dashboard → Developer → Webhooks पर जाएं और Add Webhook क्लिक करें।
अपना HTTPS endpoint URL दर्ज करें और जिन events को subscribe करना चाहते हैं उन्हें चुनें।
Webhook secret कॉपी करें, यह केवल एक बार दिखाया जाता है।
अपने server में, processing से पहले X-SID-Signature header सत्यापित करें।
10 सेकंड के भीतर HTTP 2xx लौटाएं। विफल deliveries को अधिकतम 3 बार retry किया जाता है; लगातार 5 विफल deliveries के बाद webhook स्वतः निष्क्रिय हो जाता है।
मिनटों में API key बनाएं। मुफ़्त tier शामिल, कोई क्रेडिट कार्ड आवश्यक नहीं।