Skip to main content

Links

Base: https://api.linklane.io/api. Requires links:read / links:write scopes.

POST /api/links
{
"url": "https://example.com/path",
"custom_alias": "launch",
"tags": ["q3", "email"],
"expires_in_days": 30,
"max_clicks": 1000,
"utm": { "source": "newsletter", "medium": "email" }
}

Returns a LinkOut (code, short_url, url, clicks, settings…). Paid-only fields (routing, pixels, custom domain, protection) require the matching plan or return 402.

GET /api/links?tag=q3&campaign_id=…

Returns up to 500 of your links (newest first). Optional tag and campaign_id filters.

Get / update / delete

GET /api/links/{id}
PATCH /api/links/{id}
DELETE /api/links/{id}

PATCH uses paired clear_* flags to unset a field (e.g. clear_password: true, clear_routing: true) — sending null does not clear; send the flag.

Goals

POST /api/links/{id}/goals # { "kind": "clicks_total", "threshold": 1000, "notify_email": "…" }
GET /api/links/{id}/goals
DELETE /api/links/{id}/goals/{goal_id}

Other

GET /api/tags # your tags + counts
POST /api/links/{id}/refresh-preview # re-fetch OG metadata
POST /api/links/{id}/snapshot # save a Wayback snapshot fallback