5 інструментів, усі на платному тарифі.
create_short_link
Створює короткі посиланняПлатний тарифCreate a short link
Коротке посилання unil.li з випадковою адресою. Якщо в профілі вже є неархівне посилання саме на цю адресу, повертає його.
Create a short link (unil.li) that redirects to a web address. The slug is random and cannot be chosen. If the profile already has a short link to exactly this address that is not archived, that link is returned and nothing new is created; the result says so. The plan's short link limit is checked first, so at the limit even that call is refused. The address must be an http:// or https:// web address on a public host (a bare domain such as example.com is taken as https://), at most 2048 characters. The address is always checked with Google Safe Browsing, also when the link already exists: the call is refused when the address is flagged or when the check cannot be made. The link shows in the UniLink Dashboard's Short Links screen; its ID is the linkId list_short_links, get_short_link_stats, update_short_link and create_qr_code take. Paid UniLink plans only. Each new link counts toward the plan's short link limit, and an account can create short links or change their destinations at most 10 times a minute and 100 times a day.
Аргументи
profileIdintegerобовʼязковий
Profile ID
urlstringобовʼязковий
Web address the short link redirects to (http or https), at most 2048 characters
namestringнеобовʼязковий
Optional label shown in the Dashboard, at most 256 characters (default: the address's domain)
readOnlyHint: falsedestructiveHint: falseidempotentHint: trueopenWorldHint: true
list_short_links
Лише читанняПлатний тарифList short links
Короткі посилання профілю, від найновіших: куди ведуть, чи активні, кліки й сканування QR за весь час. Посторінково.
List the profile's short links, newest first: each link's ID (the linkId the other short link tools take), name, short URL, destination, whether it is active (an inactive link does not redirect) and archived, all-time clicks and QR code scans, and creation date (UTC). Archived links are left out unless includeArchived is true. search matches the name, the slug or the destination. Paginated with take/skip: the text ends with a line Pagination: {"hasMore":true|false,"nextSkip":n|null}; while hasMore is true, call again with skip = nextSkip.
Аргументи
profileIdintegerобовʼязковий
Profile ID
searchstringнеобовʼязковий
Text to look for in the name, slug or destination (optional)
takeintegerнеобовʼязковийтипово: 20
Number of links (default 20, max 100)
skipintegerнеобовʼязковийтипово: 0
Offset (default 0)
includeArchivedbooleanнеобовʼязковийтипово: false
Include archived links (default false)
readOnlyHint: truedestructiveHint: falseidempotentHint: trueopenWorldHint: false
get_short_link_stats
Лише читанняПлатний тарифGet short link stats
Кліки, сканування QR і унікальні відвідувачі за останні days днів і за весь час.
Get one short link's visits: clicks, QR code scans and unique visitors (clicks and scans together), over the last days days (default 30, UTC) and over all time. A scan is a visit through the link's QR code (the short URL with ?p=qr, which create_qr_code encodes); every other visit is a click. linkId comes from list_short_links or create_short_link.
Аргументи
profileIdintegerобовʼязковий
Profile ID
linkIdintegerобовʼязковий
Short link ID (from list_short_links)
daysintegerнеобовʼязковийтипово: 30
Length of the recent window in days, ending now (default 30, max 365)
readOnlyHint: truedestructiveHint: falseidempotentHint: trueopenWorldHint: false
update_short_link
Перезаписує вмістПлатний тарифUpdate a short link
Нова адреса, назва або вимкнення посилання. Видалення немає: вимкнене посилання можна ввімкнути знову.
Change one short link's destination address, name, or whether it is active. Send at least one of destinationUrl, name and isActive; anything not sent stays as it is. The short URL never changes. An inactive link stops redirecting (visitors get a not-found page): isActive=false is the reversible way to retire a link, there is no delete. A new destination follows create_short_link's rules: an http:// or https:// web address on a public host, at most 2048 characters, checked with Google Safe Browsing (refused when flagged or when the check cannot be made), and counted in the same limit of 10 a minute and 100 a day. Paid UniLink plans only.
Аргументи
profileIdintegerобовʼязковий
Profile ID
linkIdintegerобовʼязковий
Short link ID (from list_short_links)
destinationUrlstringнеобовʼязковий
New web address (http or https), at most 2048 characters (optional)
namestringнеобовʼязковий
New label, at most 256 characters (optional)
isActivebooleanнеобовʼязковий
true = the link redirects, false = it does not (optional)
readOnlyHint: falsedestructiveHint: trueidempotentHint: trueopenWorldHint: true
create_qr_code
Лише читанняПлатний тарифCreate a QR code for a short link
PNG із QR-кодом для короткого посилання. Нічого не зберігає; сканування рахуються окремо від кліків.
Render a PNG QR code for one of the profile's short links and return it as an image. The code encodes the short URL with ?p=qr added, so each scan is counted as a QR scan in get_short_link_stats and list_short_links. Nothing is saved. size is the image's width and height in pixels, 256 to 1024 (default 512); the image can come out somewhat smaller, so that every QR module is a whole number of pixels.
Аргументи
profileIdintegerобовʼязковий
Profile ID
linkIdintegerобовʼязковий
Short link ID (from list_short_links)
sizeintegerнеобовʼязковийтипово: 512
Width and height in pixels (default 512)
readOnlyHint: truedestructiveHint: falseidempotentHint: trueopenWorldHint: false