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.

QR codes and temporary email

These methods require the X-Api-Key header (your key is in your account).

MethodParametersDescription
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

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.