API reference
Base URL: https://lynkio.org/api/v1. Create a key in Developers and send it as Authorization: Bearer lk_…. Starter keys can read; Pro and Agency keys can also write, and any key can be made read-only. The machine-readable spec is at /api/v1/openapi.json: import it into Postman or Insomnia, or generate a client from it.
data, has_more and next_cursor. Pass ?cursor= for the next page. Up to 100 per page.Idempotency-Key header on POST. Repeating the request within 24 hours returns the first response instead of creating twice.X-RateLimit-Limit and X-RateLimit-Remaining. Over the limit you get 429 with Retry-After.{"error": {"type", "message", "status"}}. Types: invalid_request, unauthorized, forbidden, not_found, conflict, rate_limited.{clickid} to a destination URL. Send it back on POST /sales as click_id and the sale is tied to the click, its link and campaign.sale.created, sale.updated, lead.created, link.* and alert.triggered are pushed to you, signed with X-Lynkio-Signature-V2. Set them up in Developers.Account
Who the key belongs to, plan limits and usage.
GET/meYour account, plan and API limits
Example
curl -X GET "https://lynkio.org/api/v1/me" \ -H "Authorization: Bearer YOUR_KEY"
Links
Create, read, change and delete short links.
GET/linksList links, newest first
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | 1 to 100. |
cursor | query | string | |
q | query | string | Search title, slug and destination. |
campaign_id | query | integer | |
status | query | string | active or paused. |
Example
curl -X GET "https://lynkio.org/api/v1/links" \ -H "Authorization: Bearer YOUR_KEY"
POST/linksCreate a link
JSON body
| Field | Type | Description |
|---|---|---|
destination_urlrequired | string | |
title | string | |
slug | string | |
slug_auto | boolean | |
root | boolean | |
domain_id | integer | |
campaign_id | integer | |
campaign | string | |
source_routes | array | |
rules | array | |
og_title | string | |
og_description | string | |
og_image | string | |
pixel_id | string | |
deep_link | boolean | |
adult | boolean | |
gambling | boolean | |
block_bots | boolean | |
cloak | boolean | |
utm_source | string | |
utm_medium | string | |
utm_campaign | string | |
utm_term | string | |
utm_content | string | |
sub_id_1 | string | |
sub_id_2 | string | |
payout | number | |
cost | number | |
description | string | |
tags | array | |
expires_at | string | |
password | string |
Example
curl -X POST "https://lynkio.org/api/v1/links" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c2a" \
-d '{"destination_url":"https://example.com/offer","title":"Spring offer"}'GET/links/{link_id}Get one link
Parameters
| Name | In | Type | Description |
|---|---|---|---|
link_idrequired | path | integer |
Example
curl -X GET "https://lynkio.org/api/v1/links/{link_id}" \
-H "Authorization: Bearer YOUR_KEY"PATCH/links/{link_id}Change a link
Parameters
| Name | In | Type | Description |
|---|---|---|---|
link_idrequired | path | integer |
JSON body
| Field | Type | Description |
|---|---|---|
root | boolean | |
destination_url | string | |
title | string | |
domain_id | integer | |
campaign_id | integer | |
campaign | string | |
source_routes | array | |
rules | array | |
og_title | string | |
og_description | string | |
og_image | string | |
pixel_id | string | |
deep_link | boolean | |
adult | boolean | |
gambling | boolean | |
block_bots | boolean | |
cloak | boolean | |
utm_source | string | |
utm_medium | string | |
utm_campaign | string | |
utm_term | string | |
utm_content | string | |
sub_id_1 | string | |
sub_id_2 | string | |
payout | number | |
cost | number | |
is_active | boolean | |
description | string | |
tags | array | |
expires_at | string | |
password | string | |
is_archived | boolean |
Example
curl -X PATCH "https://lynkio.org/api/v1/links/{link_id}" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"New title"}'DELETE/links/{link_id}Delete a link
Parameters
| Name | In | Type | Description |
|---|---|---|---|
link_idrequired | path | integer |
Example
curl -X DELETE "https://lynkio.org/api/v1/links/{link_id}" \
-H "Authorization: Bearer YOUR_KEY"GET/links/{link_id}/analyticsAnalytics for one link
Parameters
| Name | In | Type | Description |
|---|---|---|---|
link_idrequired | path | integer | |
range | query | integer | Days back, within your plan's history. |
end | query | string | Last day of the period (YYYY-MM-DD). Defaults to today. |
Example
curl -X GET "https://lynkio.org/api/v1/links/{link_id}/analytics" \
-H "Authorization: Bearer YOUR_KEY"Clicks
Raw click events, newest first.
GET/links/{link_id}/clicksRaw clicks for one link
Parameters
| Name | In | Type | Description |
|---|---|---|---|
link_idrequired | path | integer | |
limit | query | integer | |
cursor | query | string | |
since | query | string | Only clicks after this time (ISO 8601, UTC). |
bots | query | boolean | Include bot and link-preview visits. |
Example
curl -X GET "https://lynkio.org/api/v1/links/{link_id}/clicks" \
-H "Authorization: Bearer YOUR_KEY"GET/clicksRaw clicks across all links
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | |
cursor | query | string | |
since | query | string | Only clicks after this time (ISO 8601, UTC). |
bots | query | boolean | Include bot and link-preview visits. |
Example
curl -X GET "https://lynkio.org/api/v1/clicks" \ -H "Authorization: Bearer YOUR_KEY"
Campaigns
Group links, read campaign results and push ad spend.
GET/campaignsList campaigns, newest first
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | |
cursor | query | string |
Example
curl -X GET "https://lynkio.org/api/v1/campaigns" \ -H "Authorization: Bearer YOUR_KEY"
POST/campaignsCreate a campaign
JSON body
| Field | Type | Description |
|---|---|---|
namerequired | string |
Example
curl -X POST "https://lynkio.org/api/v1/campaigns" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c2a" \
-d '{"name":"Spring launch"}'GET/campaigns/{campaign_id}Get one campaign
Parameters
| Name | In | Type | Description |
|---|---|---|---|
campaign_idrequired | path | integer |
Example
curl -X GET "https://lynkio.org/api/v1/campaigns/{campaign_id}" \
-H "Authorization: Bearer YOUR_KEY"GET/campaigns/{campaign_id}/analyticsAnalytics for one campaign
Parameters
| Name | In | Type | Description |
|---|---|---|---|
campaign_idrequired | path | integer | |
range | query | integer | Days back, within your plan's history. |
end | query | string | Last day of the period (YYYY-MM-DD). Defaults to today. |
Example
curl -X GET "https://lynkio.org/api/v1/campaigns/{campaign_id}/analytics" \
-H "Authorization: Bearer YOUR_KEY"GET/campaigns/{campaign_id}/spendAd spend entries for a campaign
Parameters
| Name | In | Type | Description |
|---|---|---|---|
campaign_idrequired | path | integer |
Example
curl -X GET "https://lynkio.org/api/v1/campaigns/{campaign_id}/spend" \
-H "Authorization: Bearer YOUR_KEY"POST/campaigns/{campaign_id}/spendAdd ad spend to a campaign
Parameters
| Name | In | Type | Description |
|---|---|---|---|
campaign_idrequired | path | integer |
JSON body
| Field | Type | Description |
|---|---|---|
amountrequired | number | Amount spent, in USD. |
date | string | Day of the spend (YYYY-MM-DD). Defaults to today. |
source | string | Where the money went, for example facebook, google or tiktok. |
note | string |
Example
curl -X POST "https://lynkio.org/api/v1/campaigns/{campaign_id}/spend" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c2a" \
-d '{"amount":120.5,"date":"2026-11-20","source":"facebook"}'Sales
Read sales, record new ones and refunds.
GET/salesList sales, newest first
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | |
cursor | query | string | |
since | query | string | Only sales after this time (ISO 8601, UTC). |
link_id | query | integer | |
campaign_id | query | integer | |
status | query | string | counted (default: all), or one status such as refunded. |
Example
curl -X GET "https://lynkio.org/api/v1/sales" \ -H "Authorization: Bearer YOUR_KEY"
POST/salesRecord a sale
JSON body
| Field | Type | Description |
|---|---|---|
amountrequired | number | Sale amount in `currency`. |
currency | string | ISO currency code. Converted to USD with the day's rate. |
event_id | string | Your unique ID for this sale. Sending the same ID again never adds a second sale; a new status (for example refunded or rejected) updates it. |
click_id | string | The {clickid} value Lynkio added to your destination URL. Ties the sale to the click. |
link | string | Short link slug or URL, used when there is no click_id. |
event_name | string | For example purchase, subscription or upsell. |
status | string | approved (default), pending, rejected, cancelled or refunded. |
occurred_at | string | When the sale happened (ISO 8601; without a time zone it is read as UTC). Defaults to now. Cannot be in the future. |
email | string | Customer email (optional). Hashed with SHA-256 at once and only used to match the sale in Meta, Google and TikTok. Never stored as text. |
phone | string | Customer phone with country code (optional). Hashed like email. |
Example
curl -X POST "https://lynkio.org/api/v1/sales" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c2a" \
-d '{"amount":49,"currency":"USD","event_id":"order_8812","click_id":"1a2b3c-9f8e7d6c5b"}'GET/sales/{sale_id}Get one sale
Parameters
| Name | In | Type | Description |
|---|---|---|---|
sale_idrequired | path | integer |
Example
curl -X GET "https://lynkio.org/api/v1/sales/{sale_id}" \
-H "Authorization: Bearer YOUR_KEY"POST/sales/{sale_id}/refundRefund a sale (full or partial)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
sale_idrequired | path | integer |
JSON body
| Field | Type | Description |
|---|---|---|
amount | number | Refunded amount in the sale's currency. Leave out or 0 for a full refund. |
Example
curl -X POST "https://lynkio.org/api/v1/sales/{sale_id}/refund" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c2a" \
-d '{"amount":10}'Leads
Leads collected by your landing pages.
GET/leadsList leads, newest first
Parameters
| Name | In | Type | Description |
|---|---|---|---|
page_id | query | integer | |
q | query | string | |
limit | query | integer | |
cursor | query | string |
Example
curl -X GET "https://lynkio.org/api/v1/leads" \ -H "Authorization: Bearer YOUR_KEY"
Stats
Account totals for a period.
GET/statsAccount totals for a period
Parameters
| Name | In | Type | Description |
|---|---|---|---|
range | query | integer | Days back, within your plan's history. |
Example
curl -X GET "https://lynkio.org/api/v1/stats" \ -H "Authorization: Bearer YOUR_KEY"
Domains
Your custom domains.
GET/domainsList your custom domains
Example
curl -X GET "https://lynkio.org/api/v1/domains" \ -H "Authorization: Bearer YOUR_KEY"