Lewati ke konten utama
s.id Logo
Platform Developer

Referensi API

Jelajahi setiap operasi REST dan OAuth beserta host, metode autentikasi, scope, parameter, field request, dan response code yang tepat.

OpenAPI v2.1.0

Ikhtisar API

Operasi publik /v2 menerima API key terbatas atau access token OAuth 2.0. Operasi pengelolaan OAuth memiliki persyaratan browser, sesi, atau kredensial klien masing-masing.

Coba Referensi Interaktif
URL Dasar:
https://api.s.id/v2
Operasi
38
Scope
10

Autentikasi

Kredensial dibatasi oleh scope. Scope yang kurang menghasilkan 403 insufficient_scope. Minta hanya izin yang dibutuhkan integrasimu.

Authorization: Bearer sk_live_...

Endpoint

Katalog endpoint

Buka operasi untuk melihat base URL, autentikasi, input, dan kemungkinan response code yang tepat.

Links

POST/links/availablePeriksa ketersediaan slug

Checks whether a custom slug is available before creating a link.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

links:read

Request body

  • shortstringWajib
  • domain_aliasstring

    Custom domain, if any

Respons

200Slug is available
401
422Slug is taken or invalid
GET/links/{short}/statsLinimasa klik link

Returns a date-bucketed click-count timeline for the link.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

links:analytics

Parameter

  • shortpath · stringWajib
  • startquery · string
  • endquery · string

Respons

200Click timeline
401
403
404
429
GET/links/{short}/stats/lifetimeJumlah klik sepanjang waktu

Returns the all-time total click count for a single link.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

links:analytics

Parameter

  • shortpath · stringWajib

Respons

200Lifetime click count
401
403
404
429

User

GET/userAmbil pengguna terautentikasi
URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

user:read

Respons

200User profile
401
429
GET/quotaAmbil kuota akun

Returns the authenticated user's current plan limits and usage counters.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

user:read

Respons

200Account quota
401
429

Microsites

GET/micrositesDaftar microsite

Returns a paginated list of microsites owned by the authenticated user.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:read

Parameter

  • limitquery · integer
  • afterquery · string

    Cursor for the next page (opaque string from previous response)

Respons

200List of microsites
401
403
POST/micrositesBuat microsite
URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:write

Request body

  • slugstringWajib

    URL-safe identifier (alphanumeric + hyphens/underscores)

  • titlestringWajib
  • kindstringWajib

    Microsite category (e.g. `personal_branding`, `brand`, `other`)

  • themestring

    Theme slug (optional, defaults to the platform default)

Respons

200Microsite created
400Validation error (slug already taken, quota exceeded, etc.)
401
403
GET/microsites/{slug}Ambil microsite
URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:read

Parameter

  • slugpath · stringWajib

Respons

200Microsite detail
401
403
404Microsite not found
PUT/microsites/{slug}Perbarui microsite

Patches title, description, and/or visibility. All fields are optional.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:write

Parameter

  • slugpath · stringWajib

Request body

  • titlestring
  • descriptionstring
  • hideboolean

    Set `true` to hide the microsite from public (requires plan that supports visibility toggle)

Respons

200Updated microsite
401
403
404Microsite not found
DELETE/microsites/{slug}Hapus microsite
URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:delete

Parameter

  • slugpath · stringWajib

Respons

200Microsite deleted
401
403
404Microsite not found
POST/microsites/availablePeriksa ketersediaan slug microsite

Checks whether a microsite slug is available before creating a microsite.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:read

Request body

  • slugstringWajib

Respons

200Slug availability result
401
403
429
GET/microsites/{slug}/componentsDaftar komponen microsite

Returns the components belonging to a microsite, in display order.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:read

Parameter

  • slugpath · stringWajib

    The slug of the microsite

Respons

200List of microsite components
401
403
404
429
POST/microsites/{slug}/componentsTambahkan komponen microsite

Adds a new component to a microsite. The body is `{ kind, data, tag? }`. The shape of the `data` object depends on `kind`. Unknown fields are ignored, validation is per-kind, and invalid input returns `422`. All color fields are hex strings (e.g. `#1a56db`). **Kinds:** `PROFILE`, `LINK`, `HORIZONTAL_LINK`, `TEXT`, `IMAGE`, `MEDIA`, `DIVIDER`, `COUNTDOWN`, `MAPS`, `IMAGE_SLIDE`, `CV`, `AUTOPLAY_MUSIC`, `CONTACT`, `CALENDAR`, `SHOP_LISTING`, `SHOP_ITEM`, `SHOP_LEADERBOARD`. **Rules:** - `PROFILE`, `CV` and `AUTOPLAY_MUSIC` are unique — at most one per microsite. - `IMAGE_SLIDE` requires a plan with the Image Slide feature. - On create the password is always stored empty — set or change it via update (`PUT`). - Image fields (`image`, `imageBackground`, slide `image`) must be a local asset path, not a remote URL — they must match `[/.a-zA-Z0-9_-]+.(jpg|jpeg|png|svg|webp|gif|bmp)`; any value containing a scheme (`https://`), `//`, or `..` is rejected. **Shared field groups** (a kind that lists a group accepts all of its fields inside `data`): - **Button styling** (`LINK`, `CONTACT`, `CALENDAR`): `icon` (string, max 255), `textFont` (string, max 100), `textPosition` (string, max 100), `buttonEffect` (string, max 100), `buttonColor` (hex, max 20), `buttonBorderColor` (hex, max 20), `buttonIconBackground` (hex, max 20), `buttonShadowColor` (hex, max 20). - **Spoiler reveal** (`TEXT`, `IMAGE`, `MEDIA`, `MAPS`, `IMAGE_SLIDE`, `SHOP_LEADERBOARD`): `isSpoiler` (bool), `spoilerButtonText` (string, max 140), `spoilerButtonTextPosition` (string, max 100), `spoilerButtonIcon` (string), `spoilerButtonColor` (hex, max 20), `spoilerButtonFont` (string, max 100), `spoilerBackground` (string, max 100), `spoilerBackgroundOpacity` (string, max 100), `spoilerButtonBorderColor` (hex, max 20), `spoilerButtonIconBackground` (hex, max 20), `spoilerButtonShadowColor` (hex, max 20). - **Password protection** (`LINK`, `TEXT`, `IMAGE`, `MEDIA`, `MAPS`, `IMAGE_SLIDE`, `CONTACT`, `CV`, `SHOP_LEADERBOARD`): `passwordActive` (bool), `password` (string, max 255 — set via update only), `passwordMessage` (string, max 255).

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:write

Parameter

  • slugpath · stringWajib

    The slug of the microsite

Request body

  • kindstringWajib

    Component kind. The shape of `data` depends on this value.

  • dataobjectWajib

    Kind-specific component data. Its shape depends on `kind`. See the operation description and examples below.

  • tagstring

    Optional grouping tag

Respons

200Component created
401
403
404
422
429
PUT/microsites/{slug}/components/{componentId}Perbarui komponen microsite

Updates a single microsite component.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:write

Parameter

  • slugpath · stringWajib

    The slug of the microsite

  • componentIdpath · stringWajib

    The component ID

Request body

  • activebooleanWajib

    Whether the component is shown

  • kindstringWajib

    Component kind (e.g. `LINK`, `PROFILE`, `TEXT`)

  • dataobjectWajib

    Kind-specific component data

Respons

200Component updated
401
403
404
422
429
DELETE/microsites/{slug}/components/{componentId}Hapus komponen microsite

Deletes a single microsite component.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:delete

Parameter

  • slugpath · stringWajib

    The slug of the microsite

  • componentIdpath · stringWajib

    The component ID

Respons

200Component deleted
401
403
404
429
POST/microsites/{slug}/components/orderAtur ulang urutan komponen microsite

Reorders a microsite's components according to the provided list of component IDs.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

microsites:write

Parameter

  • slugpath · stringWajib

    The slug of the microsite

Request body

  • ordersarray<string>Wajib

    Component IDs in the desired display order

Respons

200Components reordered
401
403
404
422
429

Analytics

GET/statsAnalitik klik tingkat akun

Returns a timeline of clicks plus breakdowns by top links, referers, locations, devices, and browsers for the authenticated account. Date range is gated by subscription plan.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

links:analytics

Parameter

  • startquery · string

    Start date (YYYY-MM-DD). Defaults to 30 days ago.

  • endquery · string

    End date (YYYY-MM-DD). Defaults to today.

  • additionalquery · boolean

    Include referer, location, device, browser breakdowns

Respons

200Account analytics
401
403

QR

GET/qrAmbil pengaturan QR global

Returns the account-level (global) QR code settings applied to QR codes by default.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

qr:read

Respons

200Global QR settings
401
403
429
PUT/qrSesuaikan pengaturan QR global

Updates the account-level (global) QR code settings. All fields are optional; omitted fields are left unchanged.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

qr:write

Request body

  • logostring

    URL of the logo image embedded in the QR code

  • colorstring

    Foreground color as a hex value, e.g. #1a56db

Respons

200Updated global QR settings
401
403
422
429
GET/links/{short}/qrAmbil pengaturan QR sebuah link

Returns the QR code settings for a single link.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

qr:read

Parameter

  • shortpath · stringWajib

    The short code of the link

Respons

200Link QR settings
401
403
404
429
PUT/links/{short}/qrSesuaikan pengaturan QR sebuah link

Updates the QR code settings for a single link. All fields are optional; omitted fields are left unchanged.

URL Dasar
https://api.s.id/v2
Autentikasi
API key atau OAuth 2.0

Scope

qr:write

Parameter

  • shortpath · stringWajib

    The short code of the link

Request body

  • logostring

    URL of the logo image embedded in the QR code

  • colorstring

    Foreground color as a hex value, e.g. #1a56db

Respons

200Updated link QR settings
401
403
404
422
429

OAuth 2.0

GET/oauth/authorizeAmbil data layar persetujuan

A plain browser navigation here (no `Accept: application/json`) 302-redirects to the dash.s.id consent UI, preserving the query string. With `Accept: application/json`, returns application name, logo, and requested scopes for the consent UI to render.

URL Dasar
https://api.s.id
Autentikasi
API key

Parameter

  • client_idquery · stringWajib
  • redirect_uriquery · stringWajib
  • response_typequery · stringWajib
  • scopequery · string
  • statequery · string

    Recommended. Opaque value for CSRF protection. Returned unchanged in the redirect.

Respons

200Consent screen data
400Bad request
POST/oauth/tokenTukarkan kode atau refresh token
URL Dasar
https://api.s.id
Autentikasi
API key

Request body

  • grant_typestring
  • codestring
  • redirect_uristring
  • client_idstring
  • client_secretstring
  • refresh_tokenstring

Respons

200Token response
400Invalid grant, unsupported_grant_type, or invalid_client
401Invalid client credentials
POST/oauth/revokeCabut token

Revokes an access or refresh token. Always returns 200 OK regardless of whether the token was valid (RFC 7009).

URL Dasar
https://api.s.id
Autentikasi
API key

Request body

  • tokenstringWajib

Respons

200Token revoked
POST/oauth/introspectIntrospeksi token

Reports whether a token is currently active and, if so, which scopes and client it belongs to (RFC 7662). Client-credential protected: `client_id`/`client_secret` identify the caller, not the token owner. Always returns `200` — including for an unknown, expired, or revoked token (`{"active": false}`) — to avoid leaking token validity to unauthenticated probing.

URL Dasar
https://api.s.id
Autentikasi
API key

Request body

  • tokenstringWajib
  • client_idstringWajib
  • client_secretstringWajib

Respons

200Introspection result
400Missing token/client_id, or invalid client credentials
GET/oauth/userinfoAmbil profil pengguna terotorisasi

Returns the profile of the user who authorized the OAuth app. Requires `Authorization: Bearer <access_token>` (the OAuth access token, not an sk_live_ key).

URL Dasar
https://api.s.id
Autentikasi
OAuth 2.0

Scope

user:read

Respons

200User profile
401Unauthorized
GET/.well-known/oauth-authorization-serverMetadata Authorization Server OAuth 2.0

RFC 8414 discovery document advertising every OAuth endpoint URL, supported scopes, and PKCE methods, so standards-compliant client libraries can configure themselves instead of hard-coding s.id's URLs.

URL Dasar
https://api.s.id
Autentikasi
API key

Respons

200Authorization server metadata
GET/api/user/oauth/appsDaftar aplikasi yang diotorisasi pengguna saat ini

Returns all OAuth clients that have active tokens for the authenticated user. Auth: user session cookie (not API key).

URL Dasar
https://api.s.id
Autentikasi
API key

Respons

200List of connected apps
401Unauthorized
DELETE/api/user/oauth/apps/{clientId}Cabut semua token untuk sebuah aplikasi

Revokes all active tokens granted by the current user to the specified OAuth client.

URL Dasar
https://api.s.id
Autentikasi
API key

Parameter

  • clientIdpath · stringWajib

Respons

200App access revoked
401Unauthorized
404App not found

Integrations

POST/integrations/make/webhook/subscribeBerlangganan webhook Make.com

Registers a Make.com (Integromat) scenario webhook URL to receive s.id events. Authenticated via DeveloperAPIAuth (API key or OAuth Bearer) with no scope requirement — every authenticated developer credential can subscribe.

URL Dasar
https://api.s.id/v2
Autentikasi
API key

Respons

200Subscribed
401Unauthorized
POST/integrations/make/webhook/unsubscribeBerhenti berlangganan webhook Make.com

Removes a previously registered Make.com scenario webhook subscription. Authenticated via DeveloperAPIAuth with no scope requirement.

URL Dasar
https://api.s.id/v2
Autentikasi
API key

Respons

200Unsubscribed
401Unauthorized

Referensi Scope

links:read

Lihat daftar dan detail link

links:write

Buat dan perbarui link (buat, edit, pulihkan)

links:archive

Arsipkan link

links:analytics

Lihat statistik klik per link dan jumlah sepanjang waktu

qr:read

Lihat pengaturan QR (global dan per link)

qr:write

Sesuaikan pengaturan QR (global dan per link)

user:read

Lihat profil pengguna terautentikasi dan kuota akun

microsites:read

Lihat microsite

microsites:write

Buat, perbarui, dan kelola komponen microsite

microsites:delete

Hapus microsite dan komponennya

Batas Rate

Batas default adalah 38 permintaan per menit untuk setiap kredensial—per API key atau access token OAuth. Aplikasi OAuth juga memiliki batas gabungan 500 permintaan per menit untuk seluruh tokennya.

Respons error umum

400
Permintaan salah format atau tidak didukung
401
Kredensial tidak ada, tidak valid, dicabut, atau kedaluwarsa
403
Kredensial tidak memiliki scope yang dibutuhkan
404
Resource yang diminta tidak ditemukan
422
Validasi permintaan gagal
429
Batas permintaan terlampaui

Siap mulai membangun?

Buat API key dalam hitungan menit. Sudah termasuk tier gratis, tanpa kartu kredit.

Dapatkan API key kamu