Retrieve a list of links
GET/links
Retrieve a list of links for the authenticated project. The list will be paginated and the provided query parameters allow filtering the returned links.
Request
Query Parameters
The slug for the project to retrieve links for. E.g. for app.zli.bz/acme
, the projectSlug is acme
.
The domain to filter the links by. E.g. ac.me
. If not provided, all links for the project will be returned.
The tag ID to filter the links by.
The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
Possible values: [createdAt
, clicks
, lastClicked
]
Default value: createdAt
The field to sort the links by. The default is createdAt
, and sort order is always descending.
The page number for pagination (each page contains 100 links).
The user ID to filter the links by.
Possible values: [true
, false
]
Whether to include archived links in the response. Defaults to false
if not provided.
Responses
- 200
A list of links
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
The unique ID of the short link.
The domain of the short link. If not provided, the primary domain for the project will be used (or zli.cx
if the project has no domains).
The short link slug. If not provided, a random 7-character slug will be generated.
The destination URL of the short link.
Default value: false
Whether the short link is archived.
The date and time when the short link will expire in ISO-8601 format. Must be in the future.
The password required to access the destination URL of the short link.
Default value: false
Whether the short link uses Custom Social Media Cards feature.
The title of the short link generated via api.zli.bz/metatags
. Will be used for Custom Social Media Cards if proxy
is true.
The description of the short link generated via api.zli.bz/metatags
. Will be used for Custom Social Media Cards if proxy
is true.
The image of the short link generated via api.zli.bz/metatags
. Will be used for Custom Social Media Cards if proxy
is true.
Default value: false
Whether the short link uses link cloaking.
The iOS destination URL for the short link for iOS device targeting.
The Android destination URL for the short link for Android device targeting.
geo objectnullable
Geo targeting information for the short link in JSON format {[COUNTRY]: https://example.com
}. Learn more: https://zli.cx/geo
Default value: false
Whether the short link's stats are publicly accessible.
The unique id of the tag assigned to the short link.
The comments for the short link.
The full URL of the short link, including the https protocol (e.g. https://zli.cx/try
).
The full URL of the QR code for the short link (e.g. https://api.zli.bz/qr?url=https://zli.cx/try
).
The UTM source of the short link.
The UTM medium of the short link.
The UTM campaign of the short link.
The UTM term of the short link.
The UTM content of the short link.
The user ID of the creator of the short link.
The project ID of the short link.
The number of clicks on the short link.
The date and time when the short link was last clicked.
The date and time when the short link was created.
The date and time when the short link was last updated.
[
{
"id": "string",
"domain": "string",
"key": "string",
"url": "string",
"archived": false,
"expiresAt": "2024-02-08T04:50:25.528Z",
"password": "string",
"proxy": false,
"title": "string",
"description": "string",
"image": "string",
"rewrite": false,
"ios": "string",
"android": "string",
"geo": {},
"publicStats": false,
"tagId": "string",
"comments": "string",
"shortLink": "string",
"qrCode": "string",
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_term": "string",
"utm_content": "string",
"userId": "string",
"projectId": "string",
"clicks": 0,
"lastClicked": "2024-02-08T04:50:25.528Z",
"createdAt": "2024-02-08T04:50:25.528Z",
"updatedAt": "2024-02-08T04:50:25.528Z"
}
]