s.id Logo
Platform Developer

Referensi API

URL Dasar: https://api.s.id/v2

Coba Referensi Interaktif

Autentikasi

Kirimkan API key Anda sebagai token Bearer di setiap permintaan.

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Setiap kunci memiliki scope. Permintaan ke endpoint yang scope-nya tidak ada akan mengembalikan 403 insufficient_scope.

Links

MetodePath
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
POST/links/bulk

User

MetodePath
GET/user
GET/quota

Microsites

MetodePath
GET/microsites
POST/microsites
GET/microsites/{slug}
PUT/microsites/{slug}
DELETE/microsites/{slug}
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

Analytics

MetodePath
GET/stats

QR

MetodePath
GET/qr
PUT/qr
GET/links/{short}/qr
PUT/links/{short}/qr

OAuth 2.0

MetodePath
GET/oauth/authorize
POST/oauth/token
POST/oauth/revoke
GET/oauth/userinfo
GET/api/user/oauth/apps
DELETE/api/user/oauth/apps/{clientId}

Referensi Scope

links:readList and read links
links:writeCreate and update links (create, edit, restore)
links:archiveArchive links
links:analyticsRead per-link click statistics and lifetime counts
qr: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 quota
microsites:readRead microsites
microsites:writeCreate, update, delete and manage components of microsites

Batas Rate

38 permintaan per menit per API key. Melebihi batas akan mengembalikan HTTP 429.

StatusMeaning
200Success
400Bad request — check your parameters
401Missing or invalid API key
403Forbidden — key lacks required scope (insufficient_scope)
404Resource not found
429Rate limit exceeded
500Server error — retry with backoff
Platform Developer