urlik.xyz
Log inStart free
Developers

REST API

Create short links, read click statistics and generate QR codes from your own code. JSON over HTTPS and a single header for authentication.

Base URL
https://urlik.xyz/api/
Authentication
X-Api-Key
Format
JSON · UTF-8
Methods
10
Webhooks
Webhooks
Developers

Quickstart

Your first short link in one request.

  1. Get a key

    Create it in your account under API. Keys can be limited to specific scopes.

  2. Send the request

    POST the long URL with the X-Api-Key header, and an alias if you want one.

  3. Use the result

    return.url is the short link, return.qr its QR code and return.stats the public statistics page.

Keep the key on your server: anyone who sees it can create and change links in your account.

Your first request

POST /api/getLink.json
curl -X POST https://urlik.xyz/api/getLink.json \
  -H "X-Api-Key: $URLIK_KEY" \
  -d "url=https://example.com/spring-sale" \
  -d "alias=spring" \
  -d "mode=redirect"
Response200 OK
{
  "status": "success",
  "return": {
    "hex":   "spring",
    "url":   "https://urlik.xyz/spring",
    "qr":    "https://urlik.xyz/qr/spring.png",
    "stats": "https://urlik.xyz/spring+",
    "mode":  "redirect"
  }
}

Authentication

Send your key in the X-Api-Key header. Basic shortening works without a key; links created with a key belong to your account.

X-Api-Key: YOUR_KEY

Response format

Every method answers with JSON: status is success or error, message explains an error, return holds the data.

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

Media, QR and temporary mail

These methods need the X-Api-Key header or a call through RapidAPI.

GET/api/download.jsonDownload video or photo from 1000+ sites: formats with signed download linksKey required
ParameterRequiredDescription
urlrequiredAddress of a page with video or photo
GET /api/download.json
curl -H "X-Api-Key: $URLIK_KEY" "https://urlik.xyz/api/download.json?url=https%3A%2F%2Fexample.com%2Fspring-sale"
GET/api/qr.jsonGenerate a QR code in PNG or SVGKey required
ParameterRequiredDescription
datarequiredText or address to encode
formatoptionalpng or svg
fg, bgoptionalForeground and background colour, hex
eccoptionalError correction: L, M, Q or H
sizeoptionalImage size in pixels
GET /api/qr.json
curl -H "X-Api-Key: $URLIK_KEY" "https://urlik.xyz/api/qr.json?data=https%3A%2F%2Furlik.xyz"
GET/api/mailbox.jsonGet or create a temporary addressKey required
ParameterRequiredDescription
address | usernameoptionalTemporary address or the name for a new one; empty creates a random address
GET /api/mailbox.json
curl -H "X-Api-Key: $URLIK_KEY" "https://urlik.xyz/api/mailbox.json?address=demo%40example.com"
GET/api/messages.jsonList messages in a temporary inboxKey required
ParameterRequiredDescription
addressrequiredTemporary address
GET /api/messages.json
curl -H "X-Api-Key: $URLIK_KEY" "https://urlik.xyz/api/messages.json?address=demo%40example.com"
GET/api/message.jsonRead a single messageKey required
ParameterRequiredDescription
addressrequiredTemporary address
idrequiredMessage id from the inbox list
GET /api/message.json
curl -H "X-Api-Key: $URLIK_KEY" "https://urlik.xyz/api/message.json?address=demo%40example.com&id=1"
Swagger UI

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:

/embed
HTML
<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>
Questions & answers

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.

Urlik brings together a set of fast, privacy-friendly web tools in one place, so you can handle everyday link tasks without juggling separate services or creating accounts. Whether you are sharing a campaign, collecting a payment, verifying a sign-up or sending a confidential file, there is a dedicated, free tool ready for the job.

Esc
↑↓navigate↵open