Dokumentasi API

REST API untuk mengelola short link dan bio link secara terprogram. Base URL: https://linkpro.id/api/v1

Autentikasi

Semua request memerlukan API key yang dikirim lewat header Authorization. API key hanya dapat dibuat oleh akun admin, di menu API Keys.

Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxx

Setiap key punya rate limit (default 100 request/menit). Request tanpa key valid akan mendapat 401 Unauthorized; jika melebihi limit, 429.

Short Links
GET
/links
Daftar semua short link (mendukung ?limit= & ?offset=)
POST
/links
Buat short link baru
GET
/links/{id}
Detail satu short link
PUT
/links/{id}
Ubah destination/status/expiry tanpa mengubah short code
DELETE
/links/{id}
Hapus short link
Contoh: buat link baru
curl -X POST https://linkpro.id/api/v1/links \
  -H "Authorization: Bearer sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "targetUrl": "https://example.com/promo",
    "customSlug": "promo",
    "redirectType": 302,
    "expiryAt": null,
    "password": null
  }'
Contoh: ubah destination (short code tetap sama)
curl -X PUT https://linkpro.id/api/v1/links/{id} \
  -H "Authorization: Bearer sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "targetUrl": "https://example.com/destinasi-baru" }'
Contoh: nonaktifkan link tanpa menghapus
curl -X PUT https://linkpro.id/api/v1/links/{id} \
  -H "Authorization: Bearer sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "isActive": false }'
Field body
targetUrl — URL tujuan (wajib saat POST). Harus http/https.
customSlug — slug custom (opsional). 3–32 karakter: huruf, angka, - dan _
redirectType — 301 atau 302 (default 302)
expiryAt — tanggal kadaluarsa ISO 8601, atau null. Contoh: 2026-12-31T23:59:59Z
isActive — true/false (khusus PUT)
password — proteksi password, atau null untuk menghapusnya
Contoh response
{
  "data": {
    "id": "clx123...",
    "slug": "promo",
    "targetUrl": "https://example.com/promo",
    "isActive": true,
    "redirectType": 302,
    "expiryAt": null,
    "shortUrl": "linkpro.id/r/promo"
  }
}
Bio Links (Profiles)
GET
/profiles
Daftar semua profil bio
POST
/profiles
Buat profil bio baru (bisa sekalian dengan links awal)
GET
/profiles/{id}
Detail satu profil + link-nya
PUT
/profiles/{id}
Ubah profil (termasuk ganti slug/URL custom)
DELETE
/profiles/{id}
Hapus profil bio
POST
/profiles/{id}/links
Tambah link ke dalam profil
PUT
/profiles/{id}/links/{linkId}
Ubah link di profil
DELETE
/profiles/{id}/links/{linkId}
Hapus link dari profil
Contoh: buat profil bio dengan link sekaligus
curl -X POST https://linkpro.id/api/v1/profiles \
  -H "Authorization: Bearer sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "toko-saya",
    "displayName": "Toko Saya",
    "bio": "Belanja mudah & cepat",
    "themeId": "sunset",
    "links": [
      { "linkLabel": "Instagram", "linkUrl": "instagram.com/tokosaya", "icon": "instagram" },
      { "linkLabel": "WhatsApp", "linkUrl": "wa.me/6281234567890", "icon": "whatsapp" }
    ]
  }'

Catatan: linkUrl tanpa https:// akan otomatis dilengkapi. Tema tersedia: default, sunset, ocean, midnight, minimal.

Nawala Check API

Cek status blokir domain terhadap DNS Nawala/Komdigi (Indonesia) secara massal. Base URL: https://nawala-api.linkpro.id

🔑 API key per client (sk_nawala_<client>_<random>) + IP allowlist (double protection). Key dikelola admin master di menu Nawala API pada dashboard.
POST
/api/v1/check/bulk
Cek banyak domain sekaligus — tanpa batas jumlah, 2 metode (SDK Go + Python custom)
Contoh request
curl -X POST https://nawala-api.linkpro.id/api/v1/check/bulk \
  -H "Authorization: Bearer sk_nawala_<client>_<random>" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": ["google.com", "asiatogel.com"],
    "method": "both"
  }'
Contoh respons
{
  "ok": true,
  "total": 2,
  "results": [
    {
      "domain": "google.com",
      "checks": {
        "sdk":    { "status": "CLEAR", "blocked": false },
        "python": { "status": "CLEAR", "reason": "Nawala resolve IP valid" }
      }
    },
    {
      "domain": "asiatogel.com",
      "checks": {
        "sdk":    { "status": "BLOCKED", "blocked": true, "server": "180.131.144.144" },
        "python": { "status": "BLOCKED", "reason": "CNAME blokir Kominfo/Nawala terdeteksi (lamanlabuh.aduankonten.id)" }
      }
    }
  ]
}
Status
CLEARDNS normal — tidak diblokir
SUSPECTEDIndikasi awal diblokir
BLOCKEDTerkonfirmasi diblokir Nawala/Komdigi
ERRORGagal cek (timeout/resolver) — bukan berarti diblokir

method opsional: sdk (Go SDK resmi, cepat) · python (checker custom, DNS deep) · both (default). Rate limit: 30 req/menit per key + 60 req/menit per IP.

📖 Cara Baca Hasil (kombinasi SDK + Python)

• 🔵 SDK BLOCKED + 🐍 PY BLOCKED → 100% diblokir

• 🔵 SDK BLOCKED + 🐍 PY SUSPECTED → diblokir (SDK konfirmasi, PY mendukung)

• 🔵 SDK CLEAR + 🐍 PY SUSPECTED → kemungkinan diblokir pola tersembunyi (NXDOMAIN) — sarankan re-check

• 🔵 SDK CLEAR + 🐍 PY CLEAR → aman ✅

💡 SDK = cek cepat (sinyal langsung resolver Nawala) · Python = cek teliti (CNAME blokir + IP blackhole + perbandingan 4 resolver). Hasil beda antar metode itu normal — pola deteksinya beda, bukan error.

Kode Status
200 / 201Berhasil
400Input tidak valid (URL/slug/tanggal salah)
401API key tidak ada atau salah
404Resource tidak ditemukan / bukan milik Anda
409Slug sudah dipakai
429Melebihi rate limit
500Kesalahan server