# ZoLinks Developer API
Programmatic access to ZoLinks short URLs, gated links, QR codes, and webhooks.
- Site: https://zolinks.in
- Docs (interactive): https://zolinks.in/docs
- Developer Portal (Business Plan): https://zolinks.in/developers
## Authentication
All endpoints require a Bearer token in the `Authorization` header (or `X-API-Key` header). API keys are available to Business plan subscribers and can be generated at https://zolinks.in/developers. Keys are prefixed `zk_live_` and are scoped to the issuing account.
```
Authorization: Bearer zk_live_your_api_key_here
```
## Base URL
All endpoints are served from `https://zolinks.in/developers/api/v1`.
## Credits & rate limits
Every successful call costs 1 credit. Buy credits from the dashboard; usage is reported via `GET /credits`. Rate limits are per-key and surface as HTTP 429.
## Error codes
Errors return JSON `{ "error": string, "code": string }`. Common HTTP statuses: 400 (validation), 401 (missing/invalid key), 402 (no credits), 403 (forbidden), 404 (not found), 409 (conflict), 429 (rate limit), 500 (server).
## Endpoints
### GET /credits
Get your current credit balance and lifetime usage. Costs 1 credit per call.
**Response example**
```json
{
"balance": 974,
"total_used": 26,
"total_purchased": 1000,
"updated_at": "2026-04-29T..."
}
```
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/credits \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/credits", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/credits", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
## Short URLs
### POST /shorturls
Create a short URL. Returns the resolved public URL at https://zolinks.in/s/d/<slug>. Costs 1 credit.
**Request body**
- `target_url` (string, required) — Destination URL (http or https)
- `slug` (string) — Optional custom slug (4–32 alnum/-/_). Auto-generated if omitted.
- `title` (string) — Internal label
- `expires_at` (ISO 8601) — Optional expiry timestamp
- `password` (string) — Optional password — stored as a salted hash
```json
{
"target_url": "https://example.com/some/long/path",
"title": "Summer sale"
}
```
**Response example**
```json
{
"id": "uuid",
"slug": "Ab12Cd3",
"short_url": "https://zolinks.in/s/d/Ab12Cd3",
"target_url": "https://example.com/some/long/path",
"is_active": true,
"click_count": 0,
"created_at": "2026-06-12T..."
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/shorturls \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"target_url":"https://example.com/some/long/path"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/shorturls", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ target_url: "https://example.com/some/long/path" })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/shorturls", {
target_url: "https://example.com/some/long/path"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### POST /shorturls/bulk
Create up to 50 short URLs in a single request. Perfect for SMS blasts, WhatsApp campaigns, and automated invoice dispatches. Deducts 1 credit per URL created.
**Request body**
- `urls` (array, required) — Array of up to 50 short URL objects
```json
{
"urls": [
{
"target_url": "https://example.com/item/1",
"title": "Item 1",
"utm_params": { "utm_source": "sms", "utm_campaign": "flash_sale" },
"tags": ["sms", "sale"]
},
{
"target_url": "https://example.com/item/2",
"slug": "flash-deal-2",
"geo_targets": { "IN": "https://in.example.com", "US": "https://us.example.com" }
}
]
}
```
**Response example**
```json
{
"created_count": 2,
"shorturls": [
{
"id": "uuid-1",
"slug": "abc1234",
"target_url": "https://example.com/item/1",
"short_url": "https://zolinks.in/s/d/abc1234",
"click_count": 0
},
{
"id": "uuid-2",
"slug": "flash-deal-2",
"target_url": "https://example.com/item/2",
"short_url": "https://zolinks.in/s/d/flash-deal-2",
"click_count": 0
}
]
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/shorturls/bulk \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"urls":[{"target_url":"https://example.com/1"},{"target_url":"https://example.com/2"}]}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/shorturls/bulk", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
urls: [
{ target_url: "https://example.com/1", title: "Link 1" },
{ target_url: "https://example.com/2", slug: "custom2" }
]
})
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/shorturls/bulk", {
urls: [
{ target_url: "https://example.com/1" },
{ target_url: "https://example.com/2" }
]
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /shorturls
List short URLs owned by the calling API key, paginated.
**Query parameters**
- `page` (integer) — 1-based page number. Default 1.
- `per_page` (integer) — Clamped to [1, 100]. Default 20.
**Response example**
```json
{
"shorturls": [
{ "id": "uuid", "slug": "Ab12Cd3", "short_url": "https://zolinks.in/s/d/Ab12Cd3", "target_url": "https://...", "click_count": 42, "is_active": true, "created_at": "2026-06-12T..." }
],
"total": 1,
"page": 1,
"per_page": 20
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/shorturls?page=1&per_page=20" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/shorturls?page=1&per_page=20", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/shorturls", {
params: { page: 1, per_page: 20 },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /shorturls/:id
Fetch one short URL by id.
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PUT /shorturls/:id
Update title, expiry, active status, or password.
```json
{
"title": "Updated",
"is_active": false,
"expires_at": "2026-12-31T23:59:59Z"
}
```
**cURL**
```bash
curl -X PUT https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"is_active":false}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID", {
method: "PUT",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ is_active: false })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.put("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID", {
is_active: false
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### DELETE /shorturls/:id
Delete a short URL. Returns { "success": true }.
**cURL**
```bash
curl -X DELETE https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID", {
method: "DELETE",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.delete("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /shorturls/:id/analytics
Daily click time-series, top referrers, and top countries for a short URL.
**Query parameters**
- `days` (integer) — Window in days, 1–90. Default 30.
**Response example**
```json
{
"id": "uuid",
"total_clicks": 142,
"time_series": [ { "date": "2026-06-01", "clicks": 5 } ],
"top_referrers": [ { "source": "twitter.com", "count": 30 } ],
"top_countries": [ { "country": "IN", "count": 88 } ]
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID/analytics?days=30" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID/analytics?days=30", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID/analytics", {
params: { days: 30 },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /shorturls/:id/analytics/export?days=30&format=csv
Export detailed visitor click logs for a specific short link in CSV or JSON format.
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID/analytics/export?days=30&format=csv" \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-o link-analytics.csv
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID/analytics/export?days=30&format=csv", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const csvText = await res.text();
```
**Node.js (axios)**
```js
const axios = require("axios");
const fs = require("fs");
const res = await axios.get("https://zolinks.in/developers/api/v1/shorturls/SHORTURL_UUID/analytics/export?days=30&format=csv", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
fs.writeFileSync("link-analytics.csv", res.data);
```
## Gated Links
### POST /gated-links
Create a gated link. Public URL is https://zolinks.in/g/d/<slug>. mode 'email' is available on all plans; mode 'payment' requires the Business plan and a configured payment gateway.
**Request body**
- `title` (string, required) — Display title
- `slug` (string) — Optional custom slug
- `destination_url` (string, required) — URL revealed after unlock
- `mode` ('email' | 'payment') — Unlock method. Default 'email'.
- `price_inr` (number) — Price in paise (mode=payment)
- `price_usd` (number) — Price in cents (mode=payment)
- `max_unlocks` (integer) — Optional cap on total unlocks
- `expires_at` (ISO 8601) — Optional expiry
```json
{
"title": "Free eBook",
"destination_url": "https://example.com/ebook.pdf",
"mode": "email"
}
```
**Response example**
```json
{
"id": "uuid",
"slug": "free-ebook",
"public_url": "https://zolinks.in/g/d/free-ebook",
"mode": "email",
"is_active": true,
"view_count": 0,
"unlock_count": 0
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/gated-links \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"Free eBook","destination_url":"https://example.com/ebook.pdf","mode":"email"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/gated-links", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
title: "Free eBook",
destination_url: "https://example.com/ebook.pdf",
mode: "email"
})
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/gated-links", {
title: "Free eBook",
destination_url: "https://example.com/ebook.pdf",
mode: "email"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /gated-links
List gated links owned by the calling API key, paginated.
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/gated-links?page=1&per_page=20" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/gated-links?page=1&per_page=20", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/gated-links", {
params: { page: 1, per_page: 20 },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /gated-links/:id
Fetch one gated link by id, including counters.
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/gated-links/GATED_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PUT /gated-links/:id
Update title, destination, pricing, caps, or active status.
```json
{
"title": "Updated",
"is_active": true
}
```
**cURL**
```bash
curl -X PUT https://zolinks.in/developers/api/v1/gated-links/GATED_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"Updated"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID", {
method: "PUT",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ title: "Updated" })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.put("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID", {
title: "Updated"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### DELETE /gated-links/:id
Delete a gated link and its unlocks. Returns { "success": true }.
**cURL**
```bash
curl -X DELETE https://zolinks.in/developers/api/v1/gated-links/GATED_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID", {
method: "DELETE",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.delete("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /gated-links/:id/unlocks
List unlock records (email captures and successful payments) for a gated link.
**Query parameters**
- `page` (integer) — 1-based page. Default 1.
- `per_page` (integer) — Clamped [1, 100]. Default 50.
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/gated-links/GATED_UUID/unlocks?page=1" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID/unlocks?page=1", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID/unlocks", {
params: { page: 1 },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /gated-links/:id/analytics
Daily views/unlocks time-series for a gated link.
**Query parameters**
- `days` (integer) — Window 1–90. Default 30.
**Response example**
```json
{
"id": "uuid",
"view_count": 1280,
"unlock_count": 96,
"time_series": [ { "date": "2026-06-01", "views": 42, "unlocks": 3 } ]
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/gated-links/GATED_UUID/analytics?days=30" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID/analytics?days=30", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/gated-links/GATED_UUID/analytics", {
params: { days: 30 },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
## Sub2Unlock
### GET /sub2unlock
List all social unlock gates created by your account with pagination, search, active status, and action details.
**Query parameters**
- `page` (integer) — 1-based page. Default 1.
- `per_page` (integer) — Clamped [1, 100]. Default 20.
- `status` (string) — 'active' | 'inactive' | 'all'. Default 'all'.
- `search` (string) — Fuzzy search by title or slug.
**Response example**
```json
{
"gates": [
{
"id": "uuid",
"slug": "pro-presets",
"public_url": "https://zolinks.in/x/pro-presets",
"title": "Exclusive Lightroom Presets",
"reward_type": "url",
"reward_value": "https://drive.google.com/file/...",
"verification_mode": "honor",
"is_active": true,
"view_count": 140,
"unlock_count": 28,
"conversion_rate": "20.0%",
"actions": [
{
"id": "action-uuid",
"action_type": "youtube_sub",
"target": "https://youtube.com/@creativehub",
"display_label": "Subscribe on YouTube",
"required": true
}
],
"created_at": "2026-08-01T..."
}
],
"total": 1,
"page": 1,
"per_page": 20
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/sub2unlock?status=active&page=1" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/sub2unlock?status=active", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/sub2unlock", {
params: { status: "active" },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### POST /sub2unlock
Create a social-gated unlock campaign. Requires visitors to complete specified actions (e.g. YouTube subscribe, Instagram follow, Telegram join) before unlocking destination content.
**Request body**
- `title` (string, required) — Gate campaign title
- `reward_value` (string, required) — The destination link, file URL, or secret code revealed after unlock
- `slug` (string) — Optional custom URL slug (e.g. 'my-ebook'). Auto-generated if omitted.
- `description` (string) — Optional description or instructions for visitors
- `reward_type` (string) — 'url' | 'text' | 'file' | 'coupon'. Default 'url'.
- `verification_mode` (string) — 'honor' | 'strict'. Default 'honor'.
- `actions` (array) — List of required actions: [{ action_type, target, display_label, required }]
- `expires_at` (ISO 8601) — Optional gate expiration schedule
- `max_unlocks` (integer) — Optional total unlock capacity limit
- `show_branding` (boolean) — Show or hide ZoLinks branding. Default true.
```json
{
"title": "Exclusive Lightroom Presets",
"reward_value": "https://drive.google.com/file/...",
"slug": "pro-presets",
"actions": [
{
"action_type": "youtube_sub",
"target": "https://youtube.com/@creativehub",
"display_label": "Subscribe on YouTube",
"required": true
},
{
"action_type": "telegram_join",
"target": "https://t.me/creativespot",
"display_label": "Join Telegram VIP Channel",
"required": true
}
]
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/sub2unlock \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"Pro Presets","reward_value":"https://drive.google.com/...","actions":[{"action_type":"youtube_sub","target":"https://youtube.com/@creativehub"}]}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/sub2unlock", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
title: "Pro Presets",
reward_value: "https://drive.google.com/...",
actions: [{ action_type: "youtube_sub", target: "https://youtube.com/@creativehub" }]
})
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/sub2unlock", {
title: "Pro Presets",
reward_value: "https://drive.google.com/...",
actions: [{ action_type: "youtube_sub", target: "https://youtube.com/@creativehub" }]
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /sub2unlock/:id
Fetch single action gate configuration and social requirements by UUID or unique slug.
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /sub2unlock/:id/analytics
Retrieve comprehensive conversion analytics for a Sub2Unlock gate, including views, unlocks, conversion rate, action click breakdown, and email captures.
**Response example**
```json
{
"id": "uuid",
"slug": "pro-presets",
"title": "Exclusive Lightroom Presets",
"views": 250,
"unlocks": 65,
"conversion_rate": "26.0%",
"email_captures_count": 48,
"actions": [
{ "action_type": "youtube_sub", "target": "https://youtube.com/@...", "required": true }
]
}
```
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID/analytics \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID/analytics", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID/analytics", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PUT /sub2unlock/:id
Update an action gate's title, secret destination link, expiration schedule, or required social actions.
```json
{
"title": "Updated Presets Pack",
"is_active": true
}
```
**cURL**
```bash
curl -X PUT https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"Updated Presets Pack"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID", {
method: "PUT",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ title: "Updated Presets Pack" })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.put("https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID", {
title: "Updated Presets Pack"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### DELETE /sub2unlock/:id
Delete a Sub2Unlock gate and its associated social actions. Returns { "success": true }.
**cURL**
```bash
curl -X DELETE https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID", {
method: "DELETE",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.delete("https://zolinks.in/developers/api/v1/sub2unlock/GATE_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
## QR Codes
### POST /qr
Generate a QR image on the fly without persisting anything. Responds directly with the binary/text image. Costs 1 credit per call.
**Request body**
- `data` (string, required) — Payload to encode (URL or text)
- `format` ('svg' | 'png') — Default 'svg'
- `size` (integer) — Pixels per side, 64–2048. Default 512.
- `fg` (string) — Foreground hex (e.g. '#000000')
- `bg` (string) — Background hex
```json
{
"data": "https://zolinks.in",
"format": "svg",
"size": 512
}
```
**Response example**
```json
<svg xmlns="http://www.w3.org/2000/svg" ...>...</svg>
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/qr \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"data":"https://zolinks.in","format":"svg"}' \
-o qr.svg
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ data: "https://zolinks.in", format: "svg" })
});
const svg = await res.text();
```
**Node.js (axios)**
```js
const axios = require("axios");
const fs = require("fs");
const res = await axios.post("https://zolinks.in/developers/api/v1/qr", {
data: "https://zolinks.in", format: "png", size: 512
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" },
responseType: "arraybuffer"
});
fs.writeFileSync("qr.png", res.data);
```
### POST /qr/bulk
Generate up to 20 QR codes simultaneously in a single API call.
```json
{
"items": [
{ "data": "https://zolinks.in/table1", "fg": "#000000", "format": "png" },
{ "data": "https://zolinks.in/table2", "fg": "#dc2626", "format": "svg" }
]
}
```
**Response example**
```json
{
"total": 2,
"qr_codes": [
{
"index": 0,
"data": "https://zolinks.in/table1",
"format": "png",
"size": 512,
"qr_image_url": "https://api.qrserver.com/..."
},
{
"index": 1,
"data": "https://zolinks.in/table2",
"format": "svg",
"size": 512,
"qr_image_url": "https://api.qrserver.com/..."
}
]
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/qr/bulk \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"items":[{"data":"https://zolinks.in/1"},{"data":"https://zolinks.in/2"}]}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/bulk", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
items: [{ data: "https://zolinks.in/1" }, { data: "https://zolinks.in/2" }]
})
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/qr/bulk", {
items: [{ data: "https://zolinks.in/1" }, { data: "https://zolinks.in/2" }]
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### POST /qr/codes
Create a dynamic, trackable, or expiring QR code with custom geometry, colors, corner eyes, and center logos. Automatically provisioned under https://zolinks.in/qr/:code.
**Request body**
- `name` (string, required) — Internal name/label for the QR code
- `qr_type` (string) — 'url' | 'daily_image' | 'text' | 'vcard' | 'wifi' | 'upi' | 'email' | 'sms' | 'phone'. Default 'url'.
- `target_url` (string) — Destination URL (required for 'url' type)
- `content_data` (object | string) — Payload details for vcard, wifi, upi, daily_image, etc.
- `expires_at` (ISO 8601) — Optional expiration date. Defaults to 2 years if omitted.
- `expired_message` (string) — Custom message displayed to visitors after QR expires.
- `expired_redirect_url` (string) — Optional fallback redirect URL after expiration.
- `style_config` (object) — Styling: { dot_type: 'rounded'|'dots'|'classy'|'square'|'extra-rounded', corner_square_type: 'extra-rounded'|'dot'|'square', corner_dot_type: 'dot'|'square', fg_color: hex, bg_color: hex, center_logo: 'apple'|'instagram'|'youtube'|'whatsapp'|'spotify'|url }
```json
{
"name": "Spring Campaign",
"qr_type": "url",
"target_url": "https://zolinks.in",
"expires_at": "2026-12-31T23:59:59Z",
"style_config": {
"dot_type": "rounded",
"corner_square_type": "extra-rounded",
"fg_color": "#4f46e5"
}
}
```
**Response example**
```json
{
"id": "uuid",
"code": "qr-ab12cd34",
"name": "Spring Campaign",
"qr_type": "url",
"short_url": "https://zolinks.in/qr/qr-ab12cd34",
"qr_image_url": "https://zolinks.in/v1/qr-render/uuid",
"scans": 0,
"expires_at": "2026-12-31T23:59:59.000Z",
"is_expired": false,
"days_until_expiration": 90,
"style_config": { "dot_type": "rounded", "fg_color": "#4f46e5" },
"created_at": "2026-10-02T..."
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/qr/codes \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"Spring Campaign","qr_type":"url","target_url":"https://zolinks.in","expires_at":"2026-12-31T23:59:59Z"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/codes", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "Spring Campaign",
qr_type: "url",
target_url: "https://zolinks.in",
expires_at: "2026-12-31T23:59:59Z"
})
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/qr/codes", {
name: "Spring Campaign",
qr_type: "url",
target_url: "https://zolinks.in",
expires_at: "2026-12-31T23:59:59Z"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /qr/codes
List dynamic and studio QR codes owned by your account. Supports status, type, and search filters.
**Query parameters**
- `page` (integer) — 1-based page. Default 1.
- `per_page` (integer) — Clamped [1, 100]. Default 20.
- `status` (string) — 'active' | 'expired' | 'all'. Default 'all'.
- `type` (string) — Filter by qr_type (e.g. 'url', 'daily_image').
- `search` (string) — Fuzzy search by name or code.
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/qr/codes?status=active&page=1" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/codes?status=active", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/qr/codes", {
params: { status: "active" },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /qr/codes/:id
Fetch a QR code by UUID or unique code. Appending /render returns an instant SVG image.
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/qr/codes/QR_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /qr/codes/:id/analytics
Retrieve real-time scan metrics, expiration status, and days remaining for a dynamic QR code.
**Response example**
```json
{
"id": "uuid",
"code": "qr-ab12cd34",
"name": "Spring Campaign",
"scans": 348,
"is_expired": false,
"expires_at": "2026-12-31T23:59:59.000Z",
"days_until_expiration": 90,
"short_url": "https://zolinks.in/qr/qr-ab12cd34"
}
```
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/analytics \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/analytics", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/analytics", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PATCH /qr/codes/:id/expiry
Update or extend the expiration schedule of a time-limited QR code.
**Request body**
- `expires_at` (ISO 8601) — Set an explicit timestamp for expiration
- `extend_days` (integer) — Extend current expiration by N days (e.g. 30)
```json
{
"extend_days": 30
}
```
**cURL**
```bash
curl -X PATCH https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/expiry \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"extend_days":30}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/expiry", {
method: "PATCH",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ extend_days: 30 })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.patch("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/expiry", {
extend_days: 30
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PATCH /qr/codes/:id/daily-photo
Update today's active image or Google Photos link for a Daily Image QR code without changing the printed QR code.
**Request body**
- `photo_url` (string, required) — Direct image link or Google Photos sharing URL
- `title` (string) — Optional title or caption for today's image
```json
{
"photo_url": "https://photos.google.com/share/AF1QipN..."
}
```
**cURL**
```bash
curl -X PATCH https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/daily-photo \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"photo_url":"https://photos.google.com/share/AF1QipN..."}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/daily-photo", {
method: "PATCH",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ photo_url: "https://photos.google.com/share/AF1QipN..." })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.patch("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID/daily-photo", {
photo_url: "https://photos.google.com/share/AF1QipN..."
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PUT /qr/codes/:id
Update a saved QR code's name, target URL, style configuration, or active status.
```json
{
"name": "Updated Campaign",
"style_config": { "fg_color": "#111827" }
}
```
**cURL**
```bash
curl -X PUT https://zolinks.in/developers/api/v1/qr/codes/QR_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"Updated Campaign"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID", {
method: "PUT",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ name: "Updated Campaign" })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.put("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID", {
name: "Updated Campaign"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### DELETE /qr/codes/:id
Delete a saved QR code. Returns { "success": true }.
**cURL**
```bash
curl -X DELETE https://zolinks.in/developers/api/v1/qr/codes/QR_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID", {
method: "DELETE",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.delete("https://zolinks.in/developers/api/v1/qr/codes/QR_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
## Headless Bio
### GET /bio-pages
Fetch your public bio profile, active theme styling, link blocks, and social profiles.
**Response example**
```json
{
"profile": {
"id": "uuid",
"username": "myname",
"display_name": "My Name",
"bio": "Creator & Builder",
"theme": "gradient",
"public_url": "https://zolinks.in/myname"
},
"links": [
{ "id": "uuid", "title": "My Latest Video", "url": "https://youtube.com/...", "is_active": true }
],
"social_links": [
{ "platform": "instagram", "url": "https://instagram.com/myname" }
]
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/bio-pages" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/bio-pages", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/bio-pages", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### POST /bio-pages/links
Programmatically add a new link button to your public ZoLinks bio page.
```json
{
"title": "Exclusive Drops",
"url": "https://mywebsite.com/drops",
"icon": "sparkles",
"is_active": true
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/bio-pages/links \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"Exclusive Drops","url":"https://mywebsite.com/drops"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/bio-pages/links", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ title: "Exclusive Drops", url: "https://mywebsite.com/drops" })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/bio-pages/links", {
title: "Exclusive Drops", url: "https://mywebsite.com/drops"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
## Mini Store
### GET /products
List all digital and physical products in your ZoLinks Mini Store with pagination, search, and status filtering.
**Query parameters**
- `page` (integer) — 1-based page. Default 1.
- `per_page` (integer) — Clamped [1, 100]. Default 20.
- `status` (string) — 'active' | 'inactive' | 'all'. Default 'all'.
- `product_type` (string) — 'digital' | 'physical' | 'all'. Default 'all'.
- `search` (string) — Filter by title or description query.
**Response example**
```json
{
"products": [
{
"id": "uuid",
"title": "Lightroom Presets Pack 2026",
"description": "10 custom cinematic presets",
"product_type": "digital",
"price_inr": 299,
"price_usd": 4.99,
"currency_default": "INR",
"is_active": true,
"sales_count": 14,
"total_revenue_inr": 4186,
"created_at": "2026-08-01T..."
}
],
"total": 1,
"page": 1,
"per_page": 20
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/products?status=active&page=1" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/products?status=active", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/products", {
params: { status: "active" },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### POST /products
List a new digital or physical product in your ZoLinks Mini Store. Physical products automatically collect buyer delivery addresses.
**Request body**
- `title` (string, required) — Product display title
- `description` (string) — Product description / details
- `product_type` (string) — 'digital' | 'physical'. Default 'digital'.
- `price_inr` (number) — Price in Indian Rupees
- `price_usd` (number) — Price in US Dollars
- `currency_default` (string) — 'INR' | 'USD'. Default 'INR'.
- `image_url` (string) — Public image banner URL
- `external_download_url` (string) — Destination file download link (for digital goods)
- `whatsapp_number` (string) — Optional WhatsApp checkout phone number
- `collect_name` (boolean) — Collect customer name. Default true.
- `collect_phone` (boolean) — Collect customer phone. Default true.
- `collect_address` (boolean) — Collect delivery address (defaults true for physical).
- `download_expiry_hours` (number) — Expiry window for digital link. Default 24.
- `max_downloads` (number) — Download attempt limit. Default 5.
- `is_active` (boolean) — Visibility status. Default true.
```json
{
"title": "Lightroom Presets Pack 2026",
"description": "10 custom cinematic presets",
"product_type": "digital",
"price_inr": 299,
"price_usd": 4.99,
"external_download_url": "https://drive.google.com/file/..."
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/products \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"Presets Pack","price_inr":299,"product_type":"digital"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/products", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ title: "Presets Pack", price_inr: 299, product_type: "digital" })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/products", {
title: "Presets Pack", price_inr: 299, product_type: "digital"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /products/:id
Fetch single product details, inventory settings, and performance revenue statistics by UUID.
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/products/PRODUCT_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/products/PRODUCT_UUID", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/products/PRODUCT_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PUT /products/:id
Update product pricing, title, download links, active status, or delivery requirements.
```json
{
"title": "Presets Pack (Summer Edition)",
"price_inr": 199,
"is_active": true
}
```
**cURL**
```bash
curl -X PUT https://zolinks.in/developers/api/v1/products/PRODUCT_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"price_inr":199}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/products/PRODUCT_UUID", {
method: "PUT",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ price_inr: 199 })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.put("https://zolinks.in/developers/api/v1/products/PRODUCT_UUID", {
price_inr: 199
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### DELETE /products/:id
Remove a product from your mini store. Returns { "success": true }.
**cURL**
```bash
curl -X DELETE https://zolinks.in/developers/api/v1/products/PRODUCT_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/products/PRODUCT_UUID", {
method: "DELETE",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.delete("https://zolinks.in/developers/api/v1/products/PRODUCT_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /products/orders
List customer store orders with payment status, buyer details, and fulfillment tracking.
**Query parameters**
- `page` (integer) — 1-based page. Default 1.
- `per_page` (integer) — Clamped [1, 100]. Default 20.
- `payment_status` (string) — 'paid' | 'pending' | 'failed' | 'all'. Default 'all'.
- `fulfillment_status` (string) — 'shipped' | 'unfulfilled' | 'all'. Default 'all'.
- `product_id` (string) — Filter by specific product UUID.
- `search` (string) — Fuzzy search by buyer name, email, phone, or tracking number.
**Response example**
```json
{
"orders": [
{
"id": "uuid",
"buyer_name": "Lalremruata",
"buyer_email": "remruata@example.com",
"buyer_phone": "9876543210",
"buyer_address": "Aizawl, Mizoram, 796001",
"amount": 299,
"currency": "INR",
"payment_status": "paid",
"payment_method": "upigateway",
"shipping_carrier": "Delhivery",
"tracking_number": "DEL123456789",
"shipped_at": "2026-08-02T...",
"created_at": "2026-08-01T..."
}
],
"total": 1,
"page": 1,
"per_page": 20
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/products/orders?payment_status=paid&page=1" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/products/orders?payment_status=paid", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/products/orders", {
params: { payment_status: "paid" },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /products/orders/:id
Fetch comprehensive order details, delivery address, buyer notes, and item metadata.
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/products/orders/ORDER_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/products/orders/ORDER_UUID", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/products/orders/ORDER_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PATCH /products/orders/:id
Update shipping carrier, tracking number, tracking URL, and dispatch status. Automatically dispatches buyer shipping email and WhatsApp alerts via WAPI.
**Request body**
- `carrier` (string) — Logistics carrier (e.g. 'Blue Dart', 'Delhivery', 'Speed Post')
- `tracking_number` (string) — Consignment / AWB tracking number
- `tracking_url` (string) — Public URL where buyer can track shipment
- `shipping_notes` (string) — Optional notes for the customer
- `notes` (string) — Private seller notes for the order
- `mark_shipped` (boolean) — Set true to mark as shipped and dispatch alerts
```json
{
"carrier": "Blue Dart",
"tracking_number": "BLU987654321",
"tracking_url": "https://bluedart.com/track?no=BLU987654321",
"mark_shipped": true
}
```
**cURL**
```bash
curl -X PATCH https://zolinks.in/developers/api/v1/products/orders/ORDER_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"carrier":"Blue Dart","tracking_number":"BLU987654321","mark_shipped":true}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/products/orders/ORDER_UUID", {
method: "PATCH",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
carrier: "Blue Dart",
tracking_number: "BLU987654321",
mark_shipped: true
})
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.patch("https://zolinks.in/developers/api/v1/products/orders/ORDER_UUID", {
carrier: "Blue Dart",
tracking_number: "BLU987654321",
mark_shipped: true
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
## Audience & Leads
### GET /audience
List email subscribers and leads collected across bio page newsletter forms, Sub2Unlock action gates, and gated content. Supports source filtering and search.
**Query parameters**
- `page` (integer) — 1-based page. Default 1.
- `per_page` (integer) — Clamped [1, 100]. Default 20.
- `source` (string) — 'all' | 'newsletter' | 'sub2unlock' | 'gated_link'. Default 'all'.
- `page_id` (string) — Filter newsletter subscribers by specific bio page UUID.
- `search` (string) — Fuzzy search by subscriber email or name.
**Response example**
```json
{
"subscribers": [
{
"id": "uuid",
"email": "supporter@example.com",
"name": "Sarah Connor",
"source": "newsletter",
"entity_id": "page-uuid",
"entity_title": "My Creator Bio",
"created_at": "2026-10-02T12:00:00Z"
}
],
"total": 1,
"page": 1,
"per_page": 20,
"sources_summary": {
"newsletter": 24,
"sub2unlock": 15,
"gated_link": 8,
"total": 47
}
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/audience?source=all&page=1" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/audience?source=all", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/audience", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### POST /audience
Programmatically add a new subscriber to your bio page newsletter list. Triggers 'audience.subscribed' webhook.
**Request body**
- `email` (string, required) — Subscriber email address
- `name` (string) — Subscriber full or display name
- `page_id` (string) — Bio page UUID. If omitted, uses your primary page.
```json
{
"email": "supporter@example.com",
"name": "Sarah Connor"
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/audience \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"email":"supporter@example.com","name":"Sarah Connor"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/audience", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({ email: "supporter@example.com", name: "Sarah Connor" })
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/audience", {
email: "supporter@example.com", name: "Sarah Connor"
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /audience/export
Export all email subscribers and collected leads across all forms and action gates in standard RFC 4180 CSV or JSON format for direct import into Mailchimp, Klaviyo, or ConvertKit.
**Query parameters**
- `format` ('csv' | 'json') — Export format (default: 'csv')
- `source` (string) — 'all' | 'newsletter' | 'sub2unlock' | 'gated_link'. Default 'all'.
- `page_id` (string) — Filter by bio page UUID.
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/audience/export?format=csv" \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-o audience.csv
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/audience/export?format=csv", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const csv = await res.text();
```
**Node.js (axios)**
```js
const axios = require("axios");
const fs = require("fs");
const res = await axios.get("https://zolinks.in/developers/api/v1/audience/export?format=csv", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" },
responseType: "text"
});
fs.writeFileSync("audience.csv", res.data);
```
### DELETE /audience/:id
Unsubscribe and remove a lead from your audience database. Triggers 'audience.unsubscribed' webhook.
**cURL**
```bash
curl -X DELETE https://zolinks.in/developers/api/v1/audience/LEAD_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/audience/LEAD_UUID", {
method: "DELETE",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.delete("https://zolinks.in/developers/api/v1/audience/LEAD_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /audience/tips
List supporter donations received via your bio page Tip Jar with payment status, currency, supporter names, notes, and revenue aggregates.
**Query parameters**
- `page` (integer) — 1-based page. Default 1.
- `per_page` (integer) — Clamped [1, 100]. Default 20.
- `status` (string) — 'all' | 'paid' | 'pending' | 'failed'. Default 'all'.
- `page_id` (string) — Filter tips for a specific bio page UUID.
**Response example**
```json
{
"tips": [
{
"id": "uuid",
"page_id": "page-uuid",
"amount": 500,
"currency": "INR",
"supporter_name": "Lalhruaia",
"supporter_message": "Awesome work on the new templates!",
"payment_method": "upi",
"payment_status": "paid",
"created_at": "2026-10-02T10:30:00Z"
}
],
"total": 1,
"page": 1,
"per_page": 20,
"summary": {
"total_successful_tips": 8,
"total_amount_inr": 4200,
"total_amount_usd": 25
}
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/audience/tips?status=paid" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/audience/tips?status=paid", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/audience/tips", {
params: { status: "paid" },
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
## Custom Domains
### GET /domains
List all custom domains currently attached to your ZoLinks bio pages, with public URL, page details, and last updated timestamp.
**Response example**
```json
{
"domains": [
{
"page_id": "uuid",
"page_username": "mypage",
"page_title": "My Creator Page",
"domain": "mycreator.com",
"public_url": "https://mycreator.com",
"zolinks_url": "https://zolinks.in/mypage",
"updated_at": "2026-10-02T12:00:00Z"
}
],
"total": 1
}
```
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/domains" \\\n -H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/domains", {\n headers: { "Authorization": "Bearer zk_live_your_api_key_here" }\n});\nconst data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");\n\nconst { data } = await axios.get("https://zolinks.in/developers/api/v1/domains", {\n headers: { Authorization: "Bearer zk_live_your_api_key_here" }\n});
```
### POST /domains
Attach a custom domain to one of your bio pages. Returns DNS setup instructions (A records + TXT verification) and the verify endpoint path.
**Request body**
- `domain` (string, required) — Custom domain (e.g. mycreator.com). No http:// prefix.
- `page_id` (string, required) — UUID of the bio page to link the domain to.
```json
{
"domain": "mycreator.com",
"page_id": "PAGE_UUID"
}
```
**Response example**
```json
{
"success": true,
"domain": {
"page_id": "uuid",
"domain": "mycreator.com",
"public_url": "https://mycreator.com",
"zolinks_url": "https://zolinks.in/mypage"
},
"dns_setup_guide": {
"required_ip": "82.25.125.244",
"records": [
{ "type": "A", "host": "@", "value": "82.25.125.244", "ttl": 3600 },
{ "type": "A", "host": "www", "value": "82.25.125.244", "ttl": 3600 },
{ "type": "TXT", "host": "_zolinks.mycreator.com", "value": "zolinks_verify=mycreator.com", "ttl": 3600 }
],
"verify_endpoint": "/v1/domains/mycreator.com/verify"
}
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/domains \\\n -H "Authorization: Bearer zk_live_your_api_key_here" \\\n -H "Content-Type: application/json" \\\n -d '{"domain":"mycreator.com","page_id":"PAGE_UUID"}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/domains", {\n method: "POST",\n headers: {\n "Authorization": "Bearer zk_live_your_api_key_here",\n "Content-Type": "application/json"\n },\n body: JSON.stringify({ domain: "mycreator.com", page_id: "PAGE_UUID" })\n});\nconst data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");\n\nconst { data } = await axios.post("https://zolinks.in/developers/api/v1/domains", {\n domain: "mycreator.com", page_id: "PAGE_UUID"\n}, {\n headers: { Authorization: "Bearer zk_live_your_api_key_here" }\n});
```
### DELETE /domains/:id
Detach a custom domain from its bio page. Accepts either a page UUID or the domain name (e.g. mycreator.com).
**cURL**
```bash
curl -X DELETE https://zolinks.in/developers/api/v1/domains/mycreator.com \\\n -H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/domains/mycreator.com", {\n method: "DELETE",\n headers: { "Authorization": "Bearer zk_live_your_api_key_here" }\n});\nconst data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");\n\nconst { data } = await axios.delete("https://zolinks.in/developers/api/v1/domains/mycreator.com", {\n headers: { Authorization: "Bearer zk_live_your_api_key_here" }\n});
```
### POST /domains/:domain/verify
Trigger an immediate DNS A record, TXT verification, and HTTPS/SSL reachability diagnostic for a configured custom domain. Returns per-record status with actionable next steps.
**Response example**
```json
{
"domain": "mycreator.com",
"page_id": "uuid",
"fully_verified": true,
"dns": {
"all_ok": true,
"expected_ip": "82.25.125.244",
"expected_txt": "zolinks_verify=mycreator.com",
"a_root": { "ok": true, "records": ["82.25.125.244"] },
"a_www": { "ok": true, "records": ["82.25.125.244"] },
"txt_verification": { "ok": true, "value": "zolinks_verify=mycreator.com" }
},
"ssl": { "ok": true, "reachable": true, "status": 200 },
"next_steps": ["DNS verified! Site will be live once SSL propagates (usually < 60s)."]
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/domains/mycreator.com/verify \\\n -H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/domains/mycreator.com/verify", {\n method: "POST",\n headers: { "Authorization": "Bearer zk_live_your_api_key_here" }\n});\nconst data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");\n\nconst { data } = await axios.post("https://zolinks.in/developers/api/v1/domains/mycreator.com/verify", {}, {\n headers: { Authorization: "Bearer zk_live_your_api_key_here" }\n});
```
## Analytics
### GET /analytics?days=30
Retrieve comprehensive real-time analytics across all your links, including devices, browsers, operating systems, countries, referrers, hourly breakdown, and top links.
**Request body**
- `days` (number) — Number of past days to analyze (1-90, default: 30)
**Response example**
```json
{
"summary": {
"total_links": 42,
"active_links": 38,
"total_lifetime_clicks": 15420,
"period_clicks": 3840,
"days_analyzed": 30,
"top_country": "IN",
"top_referrer": "Instagram",
"top_device": "Mobile"
},
"daily": [
{ "date": "2026-08-01", "clicks": 142 },
{ "date": "2026-08-02", "clicks": 198 }
],
"devices": [
{ "name": "Mobile", "count": 2880, "percentage": 75 },
{ "name": "Desktop", "count": 840, "percentage": 22 },
{ "name": "Tablet", "count": 120, "percentage": 3 }
],
"browsers": [
{ "name": "Chrome", "count": 2100, "percentage": 55 },
{ "name": "Safari", "count": 1150, "percentage": 30 },
{ "name": "Edge", "count": 380, "percentage": 10 }
],
"os": [
{ "name": "Android", "count": 1920, "percentage": 50 },
{ "name": "iOS", "count": 1150, "percentage": 30 },
{ "name": "Windows", "count": 620, "percentage": 16 }
],
"countries": [
{ "country": "IN", "count": 3200 },
{ "country": "US", "count": 420 }
],
"referrers": [
{ "referrer": "Instagram", "count": 1800 },
{ "referrer": "WhatsApp", "count": 920 },
{ "referrer": "Direct", "count": 450 }
],
"hourly_distribution": [
{ "hour": 0, "count": 45 },
{ "hour": 14, "count": 320 }
],
"top_links": [
{
"id": "slk_123",
"slug": "shoe-deal",
"title": "50% Off Shoes",
"target_url": "https://...",
"short_url": "https://zolinks.in/s/d/shoe-deal",
"clicks": 1840,
"is_active": true
}
]
}
```
**cURL**
```bash
curl -X GET "${BASE_PLACEHOLDER}/analytics?days=30" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("${BASE_PLACEHOLDER}/analytics?days=30", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const analytics = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data: analytics } = await axios.get("${BASE_PLACEHOLDER}/analytics?days=30", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /analytics/export?days=30&format=csv
Export all link click logs across your entire account in standard RFC 4180 CSV or JSON format.
**Query parameters**
- `days` (number) — Past days to export (1-90, default: 30)
- `format` ('csv' | 'json') — Export format (default: 'csv')
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/analytics/export?days=30&format=csv" \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-o analytics.csv
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/analytics/export?days=30&format=csv", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const csvText = await res.text();
```
**Node.js (axios)**
```js
const axios = require("axios");
const fs = require("fs");
const res = await axios.get("https://zolinks.in/developers/api/v1/analytics/export?days=30&format=csv", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" },
responseType: "text"
});
fs.writeFileSync("analytics.csv", res.data);
```
### GET /shorturls/:id/analytics?days=30
Get detailed click analytics for a specific short URL, including device, browser, OS, hourly, country, and referrer breakdowns with recent click logs.
**Request body**
- `id` (string, required) — Short URL UUID
- `days` (number) — Past days (1-90, default 30)
**Response example**
```json
{
"id": "uuid",
"slug": "shoe-deal",
"title": "50% Off Shoes",
"target_url": "https://...",
"short_url": "https://zolinks.in/s/d/shoe-deal",
"total_lifetime_clicks": 1840,
"period_clicks": 620,
"days_analyzed": 30,
"daily": [{ "date": "2026-08-20", "clicks": 45 }],
"devices": [{ "name": "Mobile", "count": 480, "percentage": 77 }],
"browsers": [{ "name": "Chrome", "count": 340, "percentage": 55 }],
"os": [{ "name": "Android", "count": 320, "percentage": 52 }],
"countries": [{ "country": "IN", "count": 520 }],
"referrers": [{ "referrer": "Instagram", "count": 310 }],
"recent_clicks": [
{
"clicked_at": "2026-08-23T10:15:30Z",
"referrer": "Instagram",
"country": "IN",
"device": "Mobile",
"browser": "Chrome",
"os": "Android"
}
]
}
```
**cURL**
```bash
curl -X GET "${BASE_PLACEHOLDER}/shorturls/YOUR_SHORT_URL_ID/analytics?days=30" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("${BASE_PLACEHOLDER}/shorturls/YOUR_SHORT_URL_ID/analytics?days=30", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("${BASE_PLACEHOLDER}/shorturls/YOUR_SHORT_URL_ID/analytics?days=30", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
## Webhooks
### POST /webhooks
Register a new webhook endpoint.
**Request body**
- `url` (string, required) — Your webhook endpoint URL
- `events` (string[], required) — Array of event types, e.g. ["shorturl.clicked"]
```json
{
"url": "https://your-app.com/webhooks/zolinks",
"events": ["shorturl.clicked"]
}
```
**Response example**
```json
{
"id": "uuid",
"url": "https://your-app.com/webhooks/zolinks",
"events": ["shorturl.clicked"],
"secret": "whsec_...",
"message": "Store the secret securely..."
}
```
**cURL**
```bash
curl -X POST ${BASE_PLACEHOLDER}/webhooks \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-app.com/webhook","events":["shorturl.clicked"]}'
```
**JavaScript (fetch)**
```js
const res = await fetch("${BASE_PLACEHOLDER}/webhooks", {
method: "POST",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
url: "https://your-app.com/webhook",
events: ["shorturl.clicked"]
})
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("${BASE_PLACEHOLDER}/webhooks", {
url: "https://your-app.com/webhook",
events: ["shorturl.clicked"]
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /webhooks
List all your registered webhooks.
**Response example**
```json
[
{
"id": "uuid",
"url": "https://your-app.com/webhook",
"events": ["shorturl.clicked"],
"is_active": true,
"created_at": "2026-04-02T..."
}
]
```
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/webhooks \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/webhooks", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/webhooks", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### GET /webhooks/:id
Fetch a single webhook by ID.
**cURL**
```bash
curl https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### PUT /webhooks/:id
Update a webhook's URL, events, or active status.
```json
{
"url": "https://new-url.com/webhooks",
"is_active": false
}
```
**cURL**
```bash
curl -X PUT https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"url":"https://new-url.com/webhooks","is_active":false}'
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID", {
method: "PUT",
headers: {
"Authorization": "Bearer zk_live_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
url: "https://new-url.com/webhooks",
is_active: false
})
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.put("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID", {
url: "https://new-url.com/webhooks",
is_active: false
}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### DELETE /webhooks/:id
Delete a webhook. Returns { "success": true }.
**Response example**
```json
{ "success": true }
```
**cURL**
```bash
curl -X DELETE https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID", {
method: "DELETE",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.delete("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### POST /webhooks/:id/test
Enqueue a synthetic webhook.test delivery so you can verify your endpoint signature/handler.
**Response example**
```json
{
"success": true,
"message": "Test delivery enqueued.",
"payload": { "test": true, "message": "...", "timestamp": "..." }
}
```
**cURL**
```bash
curl -X POST https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/test \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/test", {
method: "POST",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post(
"https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/test",
null,
{ headers: { Authorization: "Bearer zk_live_your_api_key_here" } }
);
```
### GET /webhooks/:id/deliveries
List recent delivery attempts, HTTP response codes, and retry statuses for a webhook endpoint.
**cURL**
```bash
curl "https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/deliveries" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/deliveries", {
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.get("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/deliveries", {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```
### POST /webhooks/:id/deliveries/:delivery_id/retry
Manually re-enqueue and retry a failed or dead webhook delivery.
**cURL**
```bash
curl -X POST "https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/deliveries/DELIVERY_UUID/retry" \
-H "Authorization: Bearer zk_live_your_api_key_here"
```
**JavaScript (fetch)**
```js
const res = await fetch("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/deliveries/DELIVERY_UUID/retry", {
method: "POST",
headers: { "Authorization": "Bearer zk_live_your_api_key_here" }
});
const data = await res.json();
```
**Node.js (axios)**
```js
const axios = require("axios");
const { data } = await axios.post("https://zolinks.in/developers/api/v1/webhooks/WEBHOOK_UUID/deliveries/DELIVERY_UUID/retry", {}, {
headers: { Authorization: "Bearer zk_live_your_api_key_here" }
});
```