Mulai
API Kliqs memungkinkan kamu membuat shortlink dari aplikasi, website, bot, atau sistem backend kamu.
Domain resmi Kliqs
api.kliqs.me— endpoint API resmi.kliqs.me— shortlink publik & Bio Page.home.kliqs.me— website marketing.dash.kliqs.me— dashboard.docs.kliqs.me— dokumentasi.
- Buat akun Kliqs.
- Buka Dashboard → Pengaturan → API Keys.
- Buat API key baru.
- Salin API key sekali — kunci tidak akan ditampilkan lagi.
- Kirim request ke
POST https://api.kliqs.me/api/v1/linksmenggunakan Bearer authentication.
Buat API Key
- Login ke akun Kliqs kamu.
- Buka Dashboard → Pengaturan → API Keys.
- Klik tombol Buat API Key dan beri nama (misal: "server-produksi").
- Salin key yang muncul — key hanya ditampilkan sekali.
- Simpan key di environment variable backend kamu (jangan di frontend).
- Cabut key kapan saja dari halaman yang sama jika bocor atau tidak dipakai.
Sebelum menghubungkan backend kamu, kamu bisa mengetes API key dari Dashboard → Pengaturan → API Keys → API Self-Test.
Autentikasi
Sertakan API key kamu di header Authorization untuk setiap request.
Authorization: Bearer YOUR_API_KEYcurl -X POST "https://api.kliqs.me/api/v1/links" \
-H "Authorization: Bearer kliqs_sk_live_xxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"url":"https://marketku.id/products/8f3f4f3f-1231-1231-1231"}'Jangan taruh API key di frontend, browser, atau aplikasi publik. Gunakan API key dari server/backend kamu. Cabut API key yang bocor segera.
Buat Shortlink
POST
https://api.kliqs.me/api/v1/links{
"url": "https://marketku.id/products/8f3f4f3f-1231-1231-1231",
"slug": "vps-murah",
"title": "VPS Murah",
"description": "Product link from Marketku"
}Node.js / JavaScript
const response = await fetch("https://api.kliqs.me/api/v1/links", {
method: "POST",
headers: {
"Authorization": "Bearer kliqs_sk_live_xxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
url: "https://marketku.id/products/8f3f4f3f-1231-1231-1231",
slug: "vps-murah",
title: "VPS Murah"
})
});
const result = await response.json();
if (result.success) {
console.log("Short URL:", result.data.short_url);
} else {
console.error(result.error, result.message);
}PHP
$ch = curl_init("https://api.kliqs.me/api/v1/links");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer kliqs_sk_live_xxxxxxxxx",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"url" => "https://marketku.id/products/8f3f4f3f-1231-1231-1231",
"slug" => "vps-murah",
"title" => "VPS Murah"
]));
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
if ($result["success"]) {
echo $result["data"]["short_url"];
}Request Body
| Field | Tipe | Wajib | Keterangan |
|---|---|---|---|
| url | string | Ya | URL tujuan (http/https). |
| slug | string | Opsional | Slug kustom. Jika kosong, dibuat otomatis. |
| title | string | Opsional | Judul link. |
| description | string | Opsional | Deskripsi link. |
| expires_at | ISO datetime | Opsional | Tanggal kedaluwarsa (harus di masa depan). |
| password | string | Opsional | Lindungi link dengan password (disimpan ter-hash). |
Format Response
{
"success": true,
"data": {
"id": "link_uuid",
"short_code": "vps-murah",
"short_url": "https://kliqs.me/vps-murah",
"destination_url": "https://marketku.id/products/8f3f4f3f-1231-1231-1231",
"title": "VPS Murah",
"created_at": "2026-06-07T00:00:00Z"
}
}Kode Error
| Status | Error | Keterangan |
|---|---|---|
| 401 | UNAUTHORIZED | Header Authorization tidak ada. |
| 401 | INVALID_API_KEY | API key tidak valid. |
| 401 | REVOKED_API_KEY | API key sudah dicabut. |
| 400 | INVALID_URL | URL tidak valid. |
| 400 | RESERVED_SLUG | Slug termasuk daftar terlarang. |
| 409 | SLUG_ALREADY_EXISTS | Slug sudah dipakai. |
| 403 | SHORTLINK_LIMIT_REACHED | Batas shortlink paket tercapai. |
| 429 | API_LIMIT_REACHED | Batas request bulanan tercapai. |
| 500 | INTERNAL_ERROR | Kesalahan server. |
Batas Request
| Paket | Request / bulan | Shortlink maks. |
|---|---|---|
| Free | 30 | 5 |
| Starter | 1.000 | 50 |
| Pro | 10.000 | 200 |
| Business | 30.000 | 500 |
- Usage di-reset setiap awal bulan (UTC).
- Request dengan API key invalid tidak dihitung.
- Request sukses dihitung ke limit bulanan.
- Jika limit tercapai, API mengembalikan HTTP 429.
Integrasi E-commerce
Saat produk baru dibuat di sistem e-commerce kamu, panggil API Kliqs dari backend lalu simpan short URL yang dikembalikan.
- Produk dibuat.
- Backend membuat URL produk panjang.
- Backend mengirim URL ke API Kliqs.
- Kliqs mengembalikan short_url.
- Backend menyimpan short_url ke record produk.
- Bot WhatsApp mengirim pesan produk dengan short_url.
{
"url": "https://marketku.id/products/PRODUCT_UUID",
"slug": "produk-sepatu-001",
"title": "Produk Sepatu"
}Bot WhatsApp
Setelah menerima short URL, bot WhatsApp kamu bisa mengirim pesan produk yang lebih rapi.
Produk baru tersedia:
VPS Murah
https://kliqs.me/vps-murahBest Practices
- Selalu panggil API dari backend, bukan frontend.
- Rahasiakan API key kamu.
- Gunakan custom slug hanya jika perlu.
- Tangani error 409 (slug conflict).
- Simpan short_url ke database kamu.
- Retry aman hanya untuk error 5xx.
- Jangan spam API request.
- Cabut API key yang bocor.
FAQ
Apakah Free plan bisa pakai API?
Bisa. Free plan mendapat 30 request API per bulan.
Apakah API key bisa dilihat lagi setelah dibuat?
Tidak. API key hanya ditampilkan sekali saat dibuat. Buat baru jika hilang.
Apakah link yang dibuat lewat API muncul di dashboard?
Ya. Link tersimpan di tabel yang sama dan muncul di Dashboard → Links.