REST API

Base URL: https://urlik.xyz/api/. Responses are JSON of the form:

{ "status": "success", "message": "...", "return": { ... } }

Authentication (optional for basic shortening) — the X-Api-Key header. Your key is in your account. Links created with a key are attached to your account.

Endpoints

POST /api/getLink.json

Create a short link.

ParameterRequiredDescription
urlrequiredtarget URL (http/https)
aliasoptionalcustom code, 2–32 chars [a-zA-Z0-9_-]
modeoptionalredirect (default), preview, frame
expireoptionallifetime in seconds (0 = never)
passwordoptionalpassword to follow the link
curl -X POST https://urlik.xyz/api/getLink.json \
 -H "X-Api-Key: YOUR_KEY" \
 -d "url=https://example.com/very/long/path" \
 -d "mode=redirect"
{ "status":"success", "return":{
 "hex":"a1b2c3", "url":"https://urlik.xyz/a1b2c3",
 "qr":"https://urlik.xyz/qr/a1b2c3.png",
 "stats":"https://urlik.xyz/a1b2c3+", "mode":"redirect" } }

POST /api/stats.json

Stats for a link. The code parameter is the short code. Returns the click count, a daily series, sources, devices and browsers.

POST /api/links.json

List your links. Requires X-Api-Key.

POST /api/update.json

Update a link (code + fields url, mode, expire, password). Requires a key/session.

POST /api/delete.json

Delete a link (code). Requires X-Api-Key or the owner's session.

Media downloader, QR codes and temporary email

These methods require the X-Api-Key header (your key is in your account) or a call through RapidAPI.

MethodParametersDescription
GET /api/download.jsonurl*download video/photo from 1000+ sites (TikTok, YouTube, Instagram…): returns formats with ready signed download links (MP4/MP3/image)
GET /api/qr.jsondata*, format, fg, bg, ecc, sizeQR code: format = png/svg, colors fg/bg
GET /api/mailbox.jsonaddress or usernameget or create a temporary address
GET /api/messages.jsonaddresslist messages in a temporary inbox
GET /api/message.jsonaddress, idread a single message

Try it live

Explore and call every endpoint right here. Paste your API key with the Authorize button to run authenticated requests.

Embed the shortener

Drop this snippet on any page to add a working URL shortener with a link back to urlik.xyz:

<iframe src="https://urlik.xyz/embed" style="width:100%;max-width:520px;height:150px;border:0" title="URL shortener by urlik.xyz" loading="lazy"></iframe>

/embed ↗

A simple REST API for short links

The Urlik REST API lets you create, read, update and delete short links from your own code and pull click statistics as JSON. It is a plain HTTPS API — send a POST request, get a predictable JSON response — so it works from any language or platform.

Basic shortening needs no credentials. To attach links to your account and manage them later, send your key in the X-Api-Key header, which you will find in your account. Responses always follow the same status, message and return shape shown below.

Do I need an API key?

Not for basic shortening — you can create a link anonymously. A key, found in your account, ties links to you and is required to list, update or delete them.

What format are responses in?

Every endpoint returns JSON with a status, a human-readable message and a return object holding the data, so parsing is consistent across calls.

Is there a rate limit?

Yes, requests are rate-limited per caller to keep the service fast and fair. Authenticated keys get a higher allowance than anonymous traffic.

Can I use it from any language?

Yes. It is a standard HTTPS JSON API, so anything that can send a POST request — curl, Python, PHP, JavaScript or Go — can use it.

What this page answers