Buat short link, lacak klik, dan otomatiskan alur kerja Anda dengan platform developer s.id. Autentikasi API key yang mudah, webhook real-time, dan OAuth 2.0 untuk aplikasi pihak ketiga.
Kelola link, kode QR, dan data pengguna dengan API JSON yang bersih. Autentikasi Bearer token, 38 req/menit.
Pelajari Lebih LanjutLangganan link.created, link.clicked, qr.scanned, dan lainnya. Payload bertanda tangan HMAC.
Pelajari Lebih LanjutAlur authorization-code dengan PKCE dan rotasi refresh token memungkinkan aplikasi Anda bertindak atas nama pengguna s.id.
Pelajari Lebih LanjutBuat short link dalam satu panggilan API.
URL Dasar: 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"}'Semua endpoint memerlukan API key dengan scope yang sesuai.
| Metode | Path | Deskripsi | Scope |
|---|---|---|---|
| GET | /links | List links | links:read |
| POST | /links | Create a link | links:write |
| POST | /links/available | Check slug availability | links:read |
| GET | /links/{short} | Get a link | links:read |
| PUT | /links/{short} | Update a link | links:write |
| DELETE | /links/{short} | Archive a link | links:archive |
| POST | /links/{short}/unarchive | Restore an archived link | links:write |
| GET | /links/{short}/stats | Link click timeline | links:analytics |
| GET | /links/{short}/stats/lifetime | Lifetime click count | links:analytics |
| GET | /user | Get authenticated user | user:read |
| GET | /quota | Get account quota | user:read |
| GET | /microsites | List microsites | microsites:read |
| POST | /microsites | Create a microsite | microsites:write |
| GET | /microsites/{slug} | Get a microsite | microsites:read |
| PUT | /microsites/{slug} | Update a microsite | microsites:write |
| DELETE | /microsites/{slug} | Delete a microsite | microsites:write |
| POST | /links/bulk | Bulk create links | links:write |
| GET | /stats | Account-level click analytics | links:analytics |
| GET | /qr | Get global QR settings | qr:read |
| PUT | /qr | Customize global QR settings | qr:write |
| GET | /links/{short}/qr | Get a link's QR settings | qr:read |
| PUT | /links/{short}/qr | Customize a link's QR settings | qr:write |
| POST | /microsites/available | Check microsite slug availability | microsites:read |
| GET | /microsites/{slug}/components | List microsite components | microsites:read |
| POST | /microsites/{slug}/components | Add a microsite component | microsites:write |
| PUT | /microsites/{slug}/components/{componentId} | Update a microsite component | microsites:write |
| DELETE | /microsites/{slug}/components/{componentId} | Delete a microsite component | microsites:write |
| POST | /microsites/{slug}/components/order | Reorder microsite components | microsites:write |
| GET | /oauth/authorize | Get consent screen data | |
| POST | /oauth/token | Exchange code or refresh token | |
| POST | /oauth/revoke | Revoke a token | |
| GET | /oauth/userinfo | Get authorized user profile | |
| GET | /api/user/oauth/apps | List apps authorized by the current user | |
| DELETE | /api/user/oauth/apps/{clientId} | Revoke all tokens for an app | |
Setiap API key memiliki scope — minta hanya izin yang dibutuhkan integrasi Anda.
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, delete and manage components of micrositesDaftarkan endpoint HTTPS untuk menerima event real-time. Setiap pengiriman ditandatangani POST dengan HMAC-SHA256.
Event yang tersedia
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 scannedContoh 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"
}Verifikasi tanda tangan (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 ditampilkan sekali saat Anda membuat webhook. Verifikasi sebelum memproses event.
Buat kunci di Dashboard → Developer → API Keys. Kirimkan sebagai token Bearer. Kunci memiliki scope dan dapat dicabut kapan saja.
Authorization: Bearer sk_live_...Gunakan alur authorization-code untuk bertindak atas nama pengguna s.id. Arahkan ke /oauth/authorize, tukarkan kode di /oauth/token.
Panduan OAuth 2.0Buat API key dalam hitungan menit. Sudah termasuk tier gratis — tanpa kartu kredit.