Skip to main content

Bulk

These endpoints power the Bulk page in the app. They need a dashboard session, so an API key gets 401. With an API key, loop over Create a link instead.

The rules below also apply when you use the Bulk page.

Bulk shorten​

POST/api/bulk/shorten
Auth
Dashboard session only
Plan
Pro and above

Creates up to 200 links in one request. Each row succeeds or fails on its own.

Body parameters​

NameTypeRequiredDescription
itemsobject[]Yes1–200 rows. Each row takes url (required), custom_alias, expires_in_days, campaign_id and tags.
Request body
{
"items": [
{ "url": "https://shop.example.com/a", "custom_alias": "shop-a", "tags": ["q2"] },
{ "url": "https://shop.example.com/b" }
]
}
Response · 200 OK (trimmed)
{
"created": 1,
"total": 2,
"results": [
{ "ok": false, "error": "Alias already taken", "input_url": "https://shop.example.com/a" },
{ "ok": true, "link": { "code": "x7Kp2qA", "short_url": "https://lny.me/x7Kp2qA" }, "input_url": "https://shop.example.com/b" }
]
}

If the batch would go over your monthly link limit, nothing is created and you get a 402. See Errors.

Import a CSV​

POST/api/bulk/import
Auth
Dashboard session only
Plan
Pro and above

Send the CSV file as the raw request body, UTF-8 encoded. The response has the same shape as Bulk shorten.

LimitValue
Rows500. Rows after that are skipped and reported.
File size1 MB. Larger files return 413.
EncodingUTF-8. A byte-order mark is fine.
ColumnRequiredDescription
urlYesThe destination.
aliasNoCustom short code.
expires_in_daysNoWhole number of days.
campaign_idNoA campaign id.
tagsNoSeparate tags with ; or ,.

Column names are not case sensitive.

links.csv
url,alias,tags
https://shop.example.com/a,shop-a,q2;email
https://shop.example.com/b,,q2

Export as CSV​

GET/api/bulk/export.csv
Auth
Dashboard session only
Plan
All plans

Downloads your links as linklane-links.csv, newest first, up to 5,000. Columns: code, url, alias, created_at, expires_at, clicks, max_clicks, activates_at, tags, campaign_id, has_password, routing_kind.

PATCH/api/bulk/links
Auth
Dashboard session only
Plan
Pro and above

Applies one change to up to 500 links.

Body parameters​

NameTypeRequiredDescription
link_idsstring[]Yes1–500 link ids.
add_tagsstring[]NoTags to add.
remove_tagsstring[]NoTags to remove.
campaign_idstringNoMove the links into this campaign.
clear_campaignbooleanNoTake the links out of their campaign.
domain_idstringNoMove the links to this verified domain.
clear_domainbooleanNoMove the links back to the default host.
archivedbooleanNoArchive or unarchive.
favoritebooleanNoStar or unstar.
Response · 200 OK
{ "ok": true, "affected": 42 }
POST/api/bulk/links/delete
Auth
Dashboard session only
Plan
All plans

Deletes up to 500 links and their click events. Body: { "link_ids": ["…"] }. This can't be undone.

Response · 200 OK
{ "ok": true, "deleted": 42 }