API v2 Shortener
သင့်အက်ပ်မှ လင့်ခ်တိုများ ဖန်တီးပြီး စီမံပါ။ Base URL: https://api.s.id/v2။ လက်ရှိဗားရှင်း 2.0.0 ဖြစ်ပြီး အပြည့်အစုံ သတ်မှတ်ချက်ကို OpenAPI ပုံစံဖြင့် ရနိုင်ပါသည်။
အပြန်အလှန် ကိုးကားချက်အထောက်အထား
API key sk_live_... atau OAuth 2.0 access token kirimkan dalam header Authorization: Bearer. API key dibuat di Dashboard > Developer; setiap key hanya boleh menggunakan scope yang Anda pilih.
| Skop | ဝင်ရောက်ခွင့် |
|---|---|
links:read | Senaraikan dan baca pautan |
links:write | Cipta dan kemas kini pautan (cipta, edit, pulihkan) |
links:archive | Arkibkan pautan |
links:analytics | Baca statistik klik setiap pautan dan jumlah sepanjang masa |
Authorization: Bearer sk_live_...လင့်ခ် ဖန်တီးခြင်း
ဦးတည်ရာ URL ဖြင့် POST /links ပို့ပါ။ custom_slug ကို မဖြည့်ပါက slug ကို အလိုအလျောက် ဖန်တီးပါမည်။
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": "[your-alias]"}'| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
long_url | string | ဟုတ်ကဲ့ | URL destinasi |
title | string | မဟုတ်ပါ | Tajuk pautan |
custom_slug | string | မဟုတ်ပါ | Slug tersuai; dijana secara automatik jika kosong |
password | string | မဟုတ်ပါ | Kata laluan yang melindungi pautan |
expired_at | integer | မဟုတ်ပါ | Masa tamat sebagai cap waktu Unix (saat) |
domain_alias | string | မဟုတ်ပါ | Domain tersuai yang digunakan selain s.id |
ဥပမာ တုံ့ပြန်ချက်:
{
"data": {
"id": 123,
"short": "[your-alias]",
"short_url": "https://s.id/[your-alias]",
"long_url": "https://example.com/long-url",
"microsite": false,
"protected": false,
"disposable": false,
"adult": false
},
"message": "link_created"
}အဆုံးမှတ်များ
Links
GET/linksSenaraikan pautan
Returns a paginated list of the authenticated user's links.
URL asas: https://api.s.id/v2 · Skop: links:read
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
page | query | integer | မဟုတ်ပါ | |
limit | query | integer | မဟုတ်ပါ | |
search | query | string | မဟုတ်ပါ | Filter by short code or URL |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | List of links |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
POST/linksCipta pautan
URL asas: https://api.s.id/v2 · Skop: links:write
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
long_url | string | ဟုတ်ကဲ့ | The destination (long) URL |
title | string | မဟုတ်ပါ | |
custom_slug | string | မဟုတ်ပါ | Custom short code; auto-generated when omitted |
password | string | မဟုတ်ပါ | Optional password to protect the link |
expired_at | integer | မဟုတ်ပါ | Optional expiry as a Unix timestamp (seconds) |
domain_alias | string | မဟုတ်ပါ | Custom domain to use instead of s.id |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | A single link |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
422 | Request validation failed |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
POST/links/availableSemak ketersediaan slug
Checks whether a custom slug is available before creating a link.
URL asas: https://api.s.id/v2 · Skop: links:read
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
short | string | ဟုတ်ကဲ့ | |
domain_alias | string | မဟုတ်ပါ | Custom domain, if any |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Slug is available |
401 | Missing or invalid API key |
422 | Slug is taken or invalid |
GET/links/{short}Dapatkan pautan
URL asas: https://api.s.id/v2 · Skop: links:read
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
short | path | string | ဟုတ်ကဲ့ | The short code of the link |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | A single link |
401 | Missing or invalid API key |
404 | Resource not found |
PUT/links/{short}Kemas kini pautan
Updates a link. All fields are optional; omitted fields are left unchanged.
- password: set a non-empty string to protect, empty string "" to remove protection.
- custom_slug: rename the short code (subject to quota).
- archive_at: schedule auto-archive on a date (YYYY-MM-DD).
- domain_alias: change the custom domain (must be owned by the user).
URL asas: https://api.s.id/v2 · Skop: links:write
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
short | path | string | ဟုတ်ကဲ့ | The short code of the link |
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
long_url | string | မဟုတ်ပါ | New destination URL |
title | string | မဟုတ်ပါ | |
custom_slug | string | မဟုတ်ပါ | Rename the short code (subject to plan quota) |
password | string | မဟုတ်ပါ | Set a password ("" removes existing protection) |
disposable | boolean | မဟုတ်ပါ | Mark link as disposable (expires after first click) |
adult | boolean | မဟုတ်ပါ | Flag link as adult content |
archive_at | string | မဟုတ်ပါ | Schedule auto-archive on this date (YYYY-MM-DD) |
domain_alias | string | မဟုတ်ပါ | Change the custom domain (must be owned by the user) |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | A single link |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
422 | Request validation failed |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
DELETE/links/{short}Arkibkan pautan
Archives (soft-deletes) a link. The short code stops resolving. Use POST /links/{short}/unarchive to restore.
URL asas: https://api.s.id/v2 · Skop: links:archive
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
short | path | string | ဟုတ်ကဲ့ | The short code of the link |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Link archived |
401 | Missing or invalid API key |
404 | Resource not found |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
POST/links/{short}/unarchivePulihkan pautan yang diarkibkan
Restores a previously archived link, making its short code resolve again.
URL asas: https://api.s.id/v2 · Skop: links:write
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
short | path | string | ဟုတ်ကဲ့ | The short code of the archived link |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Link restored |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
GET/links/{short}/statsGaris masa klik pautan
Returns a date-bucketed click-count timeline for the link.
URL asas: https://api.s.id/v2 · Skop: links:analytics
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
short | path | string | ဟုတ်ကဲ့ | |
start | query | string | မဟုတ်ပါ | |
end | query | string | မဟုတ်ပါ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Click timeline |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
GET/links/{short}/stats/lifetimeJumlah klik sepanjang masa
Returns the all-time total click count for a single link.
URL asas: https://api.s.id/v2 · Skop: links:analytics
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
short | path | string | ဟုတ်ကဲ့ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Lifetime click count |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
POST/links/bulkCipta pautan secara pukal
Create up to 100 short links in a single request. Requires a subscription plan with bulk shortening enabled. Each item reports individual success/failure — the overall request always returns 200 even if some items fail.
URL asas: https://api.s.id/v2 · Skop: links:write
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
links | object[] | ဟုတ်ကဲ့ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Bulk result — individual items may have success=false |
401 | Missing or invalid API key |
402 | Plan upgrade required (bulk shortening not in plan) |
403 | API key lacks the required scope |
User
GET/userDapatkan pengguna yang disahkan
URL asas: https://api.s.id/v2 · Skop: user:read
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | User profile |
401 | Missing or invalid API key |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
GET/quotaDapatkan kuota akaun
Returns the authenticated user's current plan limits and usage counters.
URL asas: https://api.s.id/v2 · Skop: user:read
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Account quota |
401 | Missing or invalid API key |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
QR
GET/qrDapatkan tetapan QR global
Returns the account-level (global) QR code settings applied to QR codes by default.
URL asas: https://api.s.id/v2 · Skop: qr:read
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Global QR settings |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
PUT/qrSesuaikan tetapan QR global
Updates the account-level (global) QR code settings. All fields are optional; omitted fields are left unchanged.
URL asas: https://api.s.id/v2 · Skop: qr:write
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
logo | string | မဟုတ်ပါ | URL of the logo image embedded in the QR code |
color | string | မဟုတ်ပါ | Foreground color as a hex value, e.g. #1a56db |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Updated global QR settings |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
422 | Request validation failed |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
GET/links/{short}/qrDapatkan tetapan QR pautan
Returns the QR code settings for a single link.
URL asas: https://api.s.id/v2 · Skop: qr:read
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
short | path | string | ဟုတ်ကဲ့ | The short code of the link |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Link QR settings |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
PUT/links/{short}/qrSesuaikan tetapan QR pautan
Updates the QR code settings for a single link. All fields are optional; omitted fields are left unchanged.
URL asas: https://api.s.id/v2 · Skop: qr:write
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
short | path | string | ဟုတ်ကဲ့ | The short code of the link |
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
logo | string | မဟုတ်ပါ | URL of the logo image embedded in the QR code |
color | string | မဟုတ်ပါ | Foreground color as a hex value, e.g. #1a56db |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Updated link QR settings |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
422 | Request validation failed |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
Microsites
GET/micrositesSenaraikan microsite
Returns a paginated list of microsites owned by the authenticated user.
URL asas: https://api.s.id/v2 · Skop: microsites:read
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
limit | query | integer | မဟုတ်ပါ | |
after | query | string | မဟုတ်ပါ | Cursor for the next page (opaque string from previous response) |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | List of microsites |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
POST/micrositesCipta microsite
URL asas: https://api.s.id/v2 · Skop: microsites:write
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
slug | string | ဟုတ်ကဲ့ | URL-safe identifier (alphanumeric + hyphens/underscores) |
title | string | ဟုတ်ကဲ့ | |
kind | string | ဟုတ်ကဲ့ | Microsite category (e.g. personal_branding, brand, other) |
theme | string | မဟုတ်ပါ | Theme slug (optional, defaults to the platform default) |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Microsite created |
400 | Validation error (slug already taken, quota exceeded, etc.) |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
GET/microsites/{slug}Dapatkan microsite
URL asas: https://api.s.id/v2 · Skop: microsites:read
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
slug | path | string | ဟုတ်ကဲ့ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Microsite detail |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Microsite not found |
PUT/microsites/{slug}Kemas kini microsite
Patches title, description, and/or visibility. All fields are optional.
URL asas: https://api.s.id/v2 · Skop: microsites:write
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
slug | path | string | ဟုတ်ကဲ့ |
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
title | string | မဟုတ်ပါ | |
description | string | မဟုတ်ပါ | |
hide | boolean | မဟုတ်ပါ | Set true to hide the microsite from public (requires plan that supports visibility toggle) |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Updated microsite |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Microsite not found |
DELETE/microsites/{slug}Padam microsite
URL asas: https://api.s.id/v2 · Skop: microsites:delete
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
slug | path | string | ဟုတ်ကဲ့ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Microsite deleted |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Microsite not found |
POST/microsites/availableSemak ketersediaan slug microsite
Checks whether a microsite slug is available before creating a microsite.
URL asas: https://api.s.id/v2 · Skop: microsites:read
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
slug | string | ဟုတ်ကဲ့ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Slug availability result |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
GET/microsites/{slug}/componentsSenaraikan komponen microsite
Returns the components belonging to a microsite, in display order.
URL asas: https://api.s.id/v2 · Skop: microsites:read
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
slug | path | string | ဟုတ်ကဲ့ | The slug of the microsite |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | List of microsite components |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
POST/microsites/{slug}/componentsTambah 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 asas: https://api.s.id/v2 · Skop: microsites:write
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
slug | path | string | ဟုတ်ကဲ့ | The slug of the microsite |
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
kind | PROFILE | LINK | HORIZONTAL_LINK | TEXT | IMAGE | MEDIA | DIVIDER | COUNTDOWN | MAPS | IMAGE_SLIDE | CV | AUTOPLAY_MUSIC | CONTACT | CALENDAR | SHOP_LISTING | SHOP_ITEM | SHOP_LEADERBOARD | ဟုတ်ကဲ့ | Component kind. The shape of data depends on this value. |
data | object | ဟုတ်ကဲ့ | Kind-specific component data. Its shape depends on kind. See the operation description and examples below. |
tag | string | မဟုတ်ပါ | Optional grouping tag |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Component created |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
422 | Request validation failed |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
PUT/microsites/{slug}/components/{componentId}Kemas kini komponen microsite
Updates a single microsite component.
URL asas: https://api.s.id/v2 · Skop: microsites:write
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
slug | path | string | ဟုတ်ကဲ့ | The slug of the microsite |
componentId | path | string | ဟုတ်ကဲ့ | The component ID |
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
active | boolean | ဟုတ်ကဲ့ | Whether the component is shown |
kind | string | ဟုတ်ကဲ့ | Component kind (e.g. LINK, PROFILE, TEXT) |
data | object | ဟုတ်ကဲ့ | Kind-specific component data |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Component updated |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
422 | Request validation failed |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
DELETE/microsites/{slug}/components/{componentId}Padam komponen microsite
Deletes a single microsite component.
URL asas: https://api.s.id/v2 · Skop: microsites:delete
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
slug | path | string | ဟုတ်ကဲ့ | The slug of the microsite |
componentId | path | string | ဟုတ်ကဲ့ | The component ID |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Component deleted |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
POST/microsites/{slug}/components/orderSusun semula komponen microsite
Reorders a microsite's components according to the provided list of component IDs.
URL asas: https://api.s.id/v2 · Skop: microsites:write
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
slug | path | string | ဟုတ်ကဲ့ | The slug of the microsite |
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
orders | string[] | ဟုတ်ကဲ့ | Component IDs in the desired display order |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Components reordered |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
404 | Resource not found |
422 | Request validation failed |
429 | Too many requests. Per-tier limits apply, resolved from your s.id plan: a per-credential per-minute rate limit (rate_limit_exceeded) and a daily call quota (api_quota_exceeded), both shared across every integration using your credential (sk_live_* key or OAuth token). OAuth apps also have a secondary per-client_id ceiling (client_rate_limit_exceeded) across all their users' tokens. See GET /v2/quota for your current standing, and the X-RateLimit-* / X-Quota-* response headers. |
OAuth 2.0
GET/oauth/authorizeGet consent screen data
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 asas: https://api.s.id
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
client_id | query | string | ဟုတ်ကဲ့ | |
redirect_uri | query | string | ဟုတ်ကဲ့ | |
response_type | query | code | ဟုတ်ကဲ့ | |
scope | query | string | မဟုတ်ပါ | |
state | query | string | မဟုတ်ပါ | Recommended. Opaque value for CSRF protection. Returned unchanged in the redirect. |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Consent screen data |
400 | Bad request |
POST/oauth/tokenExchange code or refresh token
URL asas: https://api.s.id
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
grant_type | authorization_code | refresh_token | မဟုတ်ပါ | |
code | string | မဟုတ်ပါ | |
redirect_uri | string | မဟုတ်ပါ | |
client_id | string | မဟုတ်ပါ | |
client_secret | string | မဟုတ်ပါ | |
refresh_token | string | မဟုတ်ပါ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Token response |
400 | Invalid grant, unsupported_grant_type, or invalid_client |
401 | Invalid client credentials |
POST/oauth/revokeRevoke a token
Revokes an access or refresh token. Always returns 200 OK regardless of whether the token was valid (RFC 7009).
URL asas: https://api.s.id
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
token | string | ဟုတ်ကဲ့ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Token revoked |
POST/oauth/introspectIntrospect a 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 asas: https://api.s.id
Badan permintaan
| Medan | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|
token | string | ဟုတ်ကဲ့ | |
client_id | string | ဟုတ်ကဲ့ | |
client_secret | string | ဟုတ်ကဲ့ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Introspection result |
400 | Missing token/client_id, or invalid client credentials |
GET/oauth/userinfoGet authorized user profile
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 asas: https://api.s.id · Skop: user:read
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | User profile |
401 | Unauthorized |
GET/.well-known/oauth-authorization-serverOAuth 2.0 Authorization Server Metadata
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 asas: https://api.s.id
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Authorization server metadata |
GET/api/user/oauth/appsList apps authorized by the current user
Returns all OAuth clients that have active tokens for the authenticated user. Auth: user session cookie (not API key).
URL asas: https://api.s.id
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | List of connected apps |
401 | Unauthorized |
DELETE/api/user/oauth/apps/{clientId}Revoke all tokens for an app
Revokes all active tokens granted by the current user to the specified OAuth client.
URL asas: https://api.s.id
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
clientId | path | string | ဟုတ်ကဲ့ |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | App access revoked |
401 | Unauthorized |
404 | App not found |
Analytics
GET/statsAnalitik klik peringkat akaun
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 asas: https://api.s.id/v2 · Skop: links:analytics
Parameter
| Medan | Lokasi | အမျိုးအစား | လိုအပ်သည် | ရှင်းလင်းချက် |
|---|---|---|---|---|
start | query | string | မဟုတ်ပါ | Start date (YYYY-MM-DD). Defaults to 30 days ago. |
end | query | string | မဟုတ်ပါ | End date (YYYY-MM-DD). Defaults to today. |
additional | query | boolean | မဟုတ်ပါ | Include referer, location, device, browser breakdowns |
Respons
| ကုဒ် | ရှင်းလင်းချက် |
|---|---|
200 | Account analytics |
401 | Missing or invalid API key |
403 | API key lacks the required scope |
ကန့်သတ်ချက်နှင့် အမှားများ
အထောက်အထား တစ်ခုစီကို တစ်မိနစ်အလိုက် ကန့်သတ်ထားပါသည်။ သင့်ကြိမ်ရေကို GET /quota ဖြင့် စစ်ပါ။
| အထောက်အထား | ကန့်သတ်ချက် |
|---|---|
| API key သို့မဟုတ် OAuth access token | တစ်မိနစ်လျှင် 38 ကြိမ် |
| OAuth အက်ပ် (token အားလုံး စုပေါင်း) | တစ်မိနစ်လျှင် 500 ကြိမ် |
| ကုဒ် | အဓိပ္ပာယ် |
|---|---|
400 | Permintaan rosak atau tidak disokong |
401 | Kelayakan hilang, tidak sah, dibatalkan atau tamat tempoh |
403 | Kelayakan tidak mempunyai skop yang diperlukan |
404 | Sumber yang diminta tidak ditemui |
422 | Pengesahan permintaan gagal |
429 | Had kadar telah dilebihi |