5 tools, all on a paid plan.
create_short_link
Creates short linksPaid planCreate a short link
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.
Arguments
profileIdintegerrequired
Profile ID
urlstringrequired
Web address the short link redirects to (http or https), at most 2048 characters
namestringoptional
Optional label shown in the Dashboard, at most 256 characters (default: the address's domain)
readOnlyHint: falsedestructiveHint: falseidempotentHint: trueopenWorldHint: true
list_short_links
Read-onlyPaid planList short links
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.
Arguments
profileIdintegerrequired
Profile ID
searchstringoptional
Text to look for in the name, slug or destination (optional)
takeintegeroptionaldefault: 20
Number of links (default 20, max 100)
skipintegeroptionaldefault: 0
Offset (default 0)
includeArchivedbooleanoptionaldefault: false
Include archived links (default false)
readOnlyHint: truedestructiveHint: falseidempotentHint: trueopenWorldHint: false
get_short_link_stats
Read-onlyPaid planGet short link stats
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.
Arguments
profileIdintegerrequired
Profile ID
linkIdintegerrequired
Short link ID (from list_short_links)
daysintegeroptionaldefault: 30
Length of the recent window in days, ending now (default 30, max 365)
readOnlyHint: truedestructiveHint: falseidempotentHint: trueopenWorldHint: false
update_short_link
Overwrites contentPaid planUpdate 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.
Arguments
profileIdintegerrequired
Profile ID
linkIdintegerrequired
Short link ID (from list_short_links)
destinationUrlstringoptional
New web address (http or https), at most 2048 characters (optional)
namestringoptional
New label, at most 256 characters (optional)
isActivebooleanoptional
true = the link redirects, false = it does not (optional)
readOnlyHint: falsedestructiveHint: trueidempotentHint: trueopenWorldHint: true
create_qr_code
Read-onlyPaid planCreate a QR code for a short link
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.
Arguments
profileIdintegerrequired
Profile ID
linkIdintegerrequired
Short link ID (from list_short_links)
sizeintegeroptionaldefault: 512
Width and height in pixels (default 512)
readOnlyHint: truedestructiveHint: falseidempotentHint: trueopenWorldHint: false