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
Creates up to 200 links in one request. Each row succeeds or fails on its own.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
items | object[] | Yes | 1–200 rows. Each row takes url (required), custom_alias, expires_in_days, campaign_id and tags. |
{
"items": [
{ "url": "https://shop.example.com/a", "custom_alias": "shop-a", "tags": ["q2"] },
{ "url": "https://shop.example.com/b" }
]
}
{
"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
Send the CSV file as the raw request body, UTF-8 encoded. The response has the same shape as Bulk shorten.
| Limit | Value |
|---|---|
| Rows | 500. Rows after that are skipped and reported. |
| File size | 1 MB. Larger files return 413. |
| Encoding | UTF-8. A byte-order mark is fine. |
| Column | Required | Description |
|---|---|---|
url | Yes | The destination. |
alias | No | Custom short code. |
expires_in_days | No | Whole number of days. |
campaign_id | No | A campaign id. |
tags | No | Separate tags with ; or ,. |
Column names are not case sensitive.
url,alias,tags
https://shop.example.com/a,shop-a,q2;email
https://shop.example.com/b,,q2
Export as CSV
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.
Edit many links
Applies one change to up to 500 links.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
link_ids | string[] | Yes | 1–500 link ids. |
add_tags | string[] | No | Tags to add. |
remove_tags | string[] | No | Tags to remove. |
campaign_id | string | No | Move the links into this campaign. |
clear_campaign | boolean | No | Take the links out of their campaign. |
domain_id | string | No | Move the links to this verified domain. |
clear_domain | boolean | No | Move the links back to the default host. |
archived | boolean | No | Archive or unarchive. |
favorite | boolean | No | Star or unstar. |
{ "ok": true, "affected": 42 }
Delete many links
Deletes up to 500 links and their click events. Body: { "link_ids": ["…"] }. This can't be undone.
{ "ok": true, "deleted": 42 }