s.id पर बनाएं: REST API, Webhooks & OAuth
s.id डेवलपर प्लेटफ़ॉर्म के साथ शॉर्ट लिंक बनाएं, क्लिक ट्रैक करें, और अपना वर्कफ़्लो स्वचालित करें। सरल API key प्रमाणीकरण, रियल-टाइम webhooks, और तृतीय-पक्ष ऐप्स के लिए OAuth 2.0।
REST API
स्वच्छ JSON API से लिंक, QR कोड और यूज़र डेटा प्रबंधित करें। Bearer token auth, 38 req/मिनट।
और अधिक जानेंWebhooks
link.created, link.clicked, qr.scanned और अधिक के लिए सदस्यता लें। HMAC-हस्ताक्षरित payloads।
और अधिक जानेंOAuth 2.0
PKCE और refresh token rotation के साथ authorization-code flow आपके ऐप को s.id उपयोगकर्ताओं की ओर से कार्य करने देता है।
और अधिक जानेंMCP सर्वर
AI agent को होस्टेड Model Context Protocol सर्वर के ज़रिए लिंक बनाने, माइक्रोसाइट प्रबंधित करने और एनालिटिक्स पढ़ने दें। 28 tools।
और अधिक जानेंत्वरित शुरुआत
एक API कॉल में शॉर्ट लिंक बनाएं।
Dashboard → Developer → API Keys खोलें
अपनी ज़रूरत के scopes के साथ key बनाएं
Bearer sk_live_... के साथ API कॉल करें
बेस URL: https://api.s.id/v2
curl -X POST https://api.s.id/v2/links \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"long_url": "https://example.com/long-url", "custom_slug": "mylink"}'Endpoints
सभी endpoints को उचित scope के साथ API key की आवश्यकता है।
| विधि | पाथ |
|---|---|
| GET | /links |
| POST | /links |
| POST | /links/available |
| GET | /links/{short} |
| PUT | /links/{short} |
| DELETE | /links/{short} |
| POST | /links/{short}/unarchive |
| GET | /links/{short}/stats |
| GET | /links/{short}/stats/lifetime |
| GET | /user |
| GET | /quota |
| GET | /microsites |
| POST | /microsites |
| GET | /microsites/{slug} |
| PUT | /microsites/{slug} |
| DELETE | /microsites/{slug} |
| POST | /links/bulk |
| GET | /stats |
| GET | /qr |
| PUT | /qr |
| GET | /links/{short}/qr |
| PUT | /links/{short}/qr |
| POST | /microsites/available |
| GET | /microsites/{slug}/components |
| POST | /microsites/{slug}/components |
| PUT | /microsites/{slug}/components/{componentId} |
| DELETE | /microsites/{slug}/components/{componentId} |
| POST | /microsites/{slug}/components/order |
| GET | /oauth/authorize |
| POST | /oauth/token |
| POST | /oauth/revoke |
| POST | /oauth/introspect |
| GET | /oauth/userinfo |
| GET | /.well-known/oauth-authorization-server |
| GET | /api/user/oauth/apps |
| DELETE | /api/user/oauth/apps/{clientId} |
| POST | /integrations/make/webhook/subscribe |
| POST | /integrations/make/webhook/unsubscribe |
API Scopes
प्रत्येक API key scoped है, केवल वही अनुमतियां मांगें जो आपके integration को चाहिए।
links:readList and read linkslinks:writeCreate and update links (create, edit, restore)links:archiveArchive linkslinks:analyticsRead per-link click statistics and lifetime countsqr:readRead QR code settings (global and per-link)qr:writeCustomize QR code settings (global and per-link)user:readRead the authenticated user profile and account quotamicrosites:readRead micrositesmicrosites:writeCreate, update and manage components of micrositesmicrosites:deleteDelete microsites and their componentsWebhooks
रियल-टाइम इवेंट प्राप्त करने के लिए HTTPS endpoint रजिस्टर करें। प्रत्येक डिलीवरी HMAC-SHA256 के साथ POST-signed होती है।
उपलब्ध events
link.createdFired when a new link is createdlink.updatedFired when a link's URL or title is changedlink.archivedFired when a link is archivedlink.clickedFired on each redirect (per-click event)microsite.publishedFired when a microsite is publishedqr.scannedFired when a QR code is scannedउदाहरण payload
{
"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"
}हस्ताक्षर सत्यापित करें (Node.js)
const crypto = require('crypto');
function verifySignature(secret, rawBody, sigHeader) {
const expected = 'sha256=' +
crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(sigHeader),
Buffer.from(expected),
);
}Secret webhook बनाते समय एक बार दिखाया जाता है। event प्रोसेस करने से पहले सत्यापित करें।
प्रमाणीकरण
प्रमाणीकरण के दो तरीके: server-to-server के लिए API keys, उपयोगकर्ता की ओर से flows के लिए OAuth 2.0।
API Keys
Dashboard → Developer → API Keys में key बनाएं। इसे Bearer token के रूप में पास करें। Keys scoped हैं और कभी भी revoke की जा सकती हैं।
Authorization: Bearer sk_live_...OAuth 2.0
s.id उपयोगकर्ताओं की ओर से कार्य करने के लिए authorization-code flow का उपयोग करें। /oauth/authorize पर redirect करें, /oauth/token पर code exchange करें।
OAuth 2.0 गाइड