Overview
Build short-link, upload, analytics and paid-access workflows with the URLZ API. This reference separates server API-key integrations from authenticated account sessions.
Server-to-server
Use your active API key to create and search links from a backend, automation or internal tool.
apikey=YOUR_API_KEYAccount session
Use a Bearer session for account-owned links, uploads, analytics and monetization.
Authorization: Bearer …Quick start
Create your first short link in three steps, then use the detailed reference for production.
- 1Create an account
Open the dashboard and activate an API plan.
- 2Copy your API key
Keep it on your server; never expose it in public code.
- 3Send the request
Post the destination and read result.short_url from the JSON response.
curl -X POST "https://api.urlz.li/url/create" \
--data-urlencode "apikey=YOUR_API_KEY" \
--data-urlencode "fullUrl=https://example.com/private-report"
// Server-side JavaScript (Node.js)
const body = new URLSearchParams({
apikey: 'YOUR_API_KEY',
fullUrl: 'https://example.com/private-report'
});
const response = await fetch('https://api.urlz.li/url/create', {
method: 'POST',
body
});
const data = await response.json();
console.log(data.result.short_url);
$request = curl_init('https://api.urlz.li/url/create');
curl_setopt_array($request, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
'apikey' => 'YOUR_API_KEY',
'fullUrl' => 'https://example.com/private-report',
]),
CURLOPT_RETURNTRANSFER => true,
]);
$data = json_decode(curl_exec($request), true, 512, JSON_THROW_ON_ERROR);
echo $data['result']['short_url'];
import requests
response = requests.post(
"https://api.urlz.li/url/create",
data={
"apikey": "YOUR_API_KEY",
"fullUrl": "https://example.com/private-report",
},
timeout=15,
)
response.raise_for_status()
print(response.json()["result"]["short_url"])
Authentication
URLZ supports two authentication modes. Choose the one that matches your integration.
API key
For backend integrations. Send apikey in the query string or form body. The key and subscription must be active.
apikey=YOUR_API_KEYBearer session
For account features. Obtain a session token from the login endpoint and send it in the Authorization header.
Authorization: Bearer SESSION_TOKENNever publish an API key, password or Bearer token in browser JavaScript, mobile logs, source control or a public repository.
Endpoint index
Select an endpoint to jump directly to its parameters, request and response examples.
/url/createCreate a short link
GET/url/listList and filter links
POST/mobile/v1/auth/login.phpOpen an account session
POST/mobile/v1/shorten.phpCreate an account-linked link
POST/mobile/v1/upload.phpUpload a file or photo
GET/mobile/v1/links.phpList account links
GET/mobile/v1/clicks.phpRead click analytics
DELETE/mobile/v1/delete-link.phpDelete a link
POST/mobile/v1/collaboration/configure.phpEnable URLZ Chat or URLZ Request
GET/mobile/v1/collaboration/chats.phpList link conversations
GET/mobile/v1/collaboration/requests.phpTrack document requests
POST/mobile/v1/monetization/links.phpCreate or convert a paid link
POST/mobile/v1/monetization/upload.phpCreate a paid file or photo
GET/mobile/v1/monetization/links.phpList paid links
GET/mobile/v1/monetization/transactions.phpList paid-link sales
API key endpoints
Stable server-to-server routes for creating and searching short links.
/url/createCreate a short link
Create a short URL with an active API key.
apikeyParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
apikey | string | Yes | — |
fullUrl | URL | Yes | — |
encrypt | string | No | "" |
password | string | No | "" |
curl -X POST "https://api.urlz.li/url/create" \
--data-urlencode "apikey=YOUR_API_KEY" \
--data-urlencode "fullUrl=https://example.com/report.pdf"
{
"result": {
"short_url": "https://urlz.li/7b3c2e5a",
"hash": "7b3c2e5a",
"date": "2026-11-02",
"time": "14:32:10"
}
}
/url/listList and filter links
Return links that belong to an API key, with filters and pagination.
apikeyParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
apikey | string | Yes | — |
limit | integer (1–1000) | No | 100 |
offset | integer | No | 0 |
order | asc | desc | No | desc |
date | YYYY-MM-DD | No | — |
from_date | YYYY-MM-DD | No | — |
to_date | YYYY-MM-DD | No | — |
url_destination | string | No | — |
hash | string | No | — |
curl -G "https://api.urlz.li/url/list" \
--data-urlencode "apikey=YOUR_API_KEY" \
--data-urlencode "limit=25" \
--data-urlencode "order=desc"
{
"result": {
"filters": { "limit": 25, "offset": 0, "order": "desc" },
"total": 42,
"count": 25,
"items": [
{
"id": 1204,
"date": "2026-11-02",
"time": "14:32:10",
"destination": "https://example.com/report.pdf",
"hash": "7b3c2e5a",
"hash_retour": "https://urlz.li/7b3c2e5a"
}
]
}
}
Account endpoints
Account-owned links, uploads, click analytics and deletion.
/mobile/v1/auth/login.phpOpen an account session
Exchange account credentials for a Bearer session token.
No authenticationParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
email | Yes | — | |
password | string | Yes | — |
curl -X POST "https://api.urlz.li/mobile/v1/auth/login.php" \
-H "Content-Type: application/json" \
-d '{"email":"developer@example.com","password":"YOUR_PASSWORD"}'
{
"token": "SESSION_TOKEN",
"user": {
"id": 42,
"email": "developer@example.com",
"apiKey": "ACCOUNT_API_KEY",
"planActive": true
}
}
/mobile/v1/shorten.phpCreate an account-linked link
Create a normal or password-protected link. Bearer authentication is optional unless a password is used.
Optional Bearer tokenParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
url | URL | Yes | — |
password | string (min. 4) | No | — |
curl -X POST "https://api.urlz.li/mobile/v1/shorten.php" \
-H "Authorization: Bearer SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/private","password":"safe-pass"}'
{
"shortUrl": "https://urlz.li/Ab3dE91x",
"destination": "https://example.com/private",
"hash": "Ab3dE91x",
"protected": true
}
/mobile/v1/upload.phpUpload a file or photo
Upload an allowed file up to 10 MB and receive a short URL.
Optional Bearer tokenParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
file | multipart file | Yes | — |
kind | photo | document | No | document |
password | string (min. 4) | No | — |
curl -X POST "https://api.urlz.li/mobile/v1/upload.php" \
-H "Authorization: Bearer SESSION_TOKEN" \
-F "file=@./photo.jpg" \
-F "kind=photo"
{
"shortUrl": "https://urlz.li/P8kLm21q",
"destination": "https://urlz.li/cloud/app/photo_….jpg",
"hash": "P8kLm21q",
"protected": false
}
/mobile/v1/links.phpList account links
List links, click totals, protection state and monetization state for the signed-in account.
BearerParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
limit | integer (1–100) | No | 100 |
offset | integer | No | 0 |
curl "https://api.urlz.li/mobile/v1/links.php?limit=25&offset=0" \
-H "Authorization: Bearer SESSION_TOKEN"
{
"items": [
{
"id": 1204,
"shortUrl": "https://urlz.li/7b3c2e5a",
"destination": "https://example.com/report.pdf",
"protected": false,
"monetized": true,
"clicks": 18
}
],
"total": 42,
"summary": { "totalLinks": 42, "totalClicks": 304, "clicksLast7Days": 28 }
}
/mobile/v1/clicks.phpRead click analytics
Retrieve click totals, unique visitors, top countries and paginated access events.
BearerParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
linkId | integer | Yes | — |
limit | integer (1–100) | No | 100 |
offset | integer | No | 0 |
curl "https://api.urlz.li/mobile/v1/clicks.php?linkId=1204&limit=25" \
-H "Authorization: Bearer SESSION_TOKEN"
{
"link": { "id": 1204, "shortUrl": "https://urlz.li/7b3c2e5a" },
"summary": {
"totalClicks": 18,
"uniqueVisitors": 14,
"clicksLast24Hours": 2,
"clicksLast7Days": 9
},
"countries": [{ "country": "France", "countryCode": "FR", "clicks": 8 }],
"items": []
}
/mobile/v1/delete-link.phpDelete a link
Delete only the link owned by the authenticated account.
BearerParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
hash | string | Yes | — |
curl -X DELETE "https://api.urlz.li/mobile/v1/delete-link.php" \
-H "Authorization: Bearer SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hash":"7b3c2e5a"}'
{
"ok": true,
"message": "Link deleted."
}
URLZ Chat & Request
Add private conversations, collect requested documents, schedule reminders and track submissions.
/mobile/v1/collaboration/configure.phpEnable URLZ Chat or URLZ Request
Attach a private conversation and/or a document request to an existing account link. A Bearer session token or API key is accepted.
Bearer or API keyParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
hash | string | Yes | — |
chat.enabled | boolean | No | false |
request.enabled | boolean | No | false |
request.title | string | No | — |
request.items | string[] | No | [] |
request.recipients | email[] | No | [] |
request.deadline | ISO datetime | No | — |
request.paymentRequired | boolean | No | false |
curl -X POST "https://api.urlz.li/mobile/v1/collaboration/configure.php" \
-H "Authorization: Bearer SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hash":"7b3c2e5a","chat":{"enabled":true},"request":{"enabled":true,"title":"Accounting documents","items":["Invoices","Bank statement"]}}'
{"featureId":14,"hash":"7b3c2e5a","chatEnabled":true,"requestEnabled":true}
/mobile/v1/collaboration/chats.phpList link conversations
Return chat-enabled links and message totals. Add id to retrieve messages.
BearerParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
id | integer | No | — |
after | integer | No | 0 |
curl "https://api.urlz.li/mobile/v1/collaboration/chats.php?id=14" \
-H "Authorization: Bearer SESSION_TOKEN"
{"items":[{"id":14,"hash":"7b3c2e5a","messageCount":3,"messages":[]}]}
/mobile/v1/collaboration/requests.phpTrack document requests
List requests, expected items, recipients, submissions and secure files. Add id for full detail.
BearerParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
id | integer | No | — |
curl "https://api.urlz.li/mobile/v1/collaboration/requests.php?id=14" \
-H "Authorization: Bearer SESSION_TOKEN"
{"items":[{"id":14,"title":"Accounting documents","recipients":1,"submissions":1,"files":2}]}
Paid-link endpoints
Create paid access and read sales data for an authenticated creator account.
/mobile/v1/monetization/links.phpCreate or convert a paid link
Create a paid URL or convert an existing account link into paid access.
BearerParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
destination | URL | No | — |
existingLinkId | integer | No | — |
title | string (max. 180) | Yes | — |
description | string (max. 3000) | No | — |
price | decimal | Yes | — |
currency | EUR | USD | Yes | USD |
accessPolicy | permanent | timed | limited | No | permanent |
accessDurationHours | integer (1–8760) | No | 24 |
maxAccesses | integer (1–1000) | No | 1 |
locale | ISO 639-1 | No | en |
curl -X POST "https://api.urlz.li/mobile/v1/monetization/links.php" \
-H "Authorization: Bearer SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"destination":"https://example.com/private-course",
"title":"Private course access",
"description":"One-time access to the course.",
"price":"9.90",
"currency":"EUR",
"accessPolicy":"permanent",
"locale":"en"
}'
{
"id": 91,
"hash": "cd3ed9a4",
"shortUrl": "https://urlz.li/cd3ed9a4",
"paywallUrl": "https://urlz.li/en/pay/cd3ed9a4/",
"converted": false
}
/mobile/v1/monetization/upload.phpCreate a paid file or photo
Store a file privately and create a paid short link. Maximum size: 50 MB.
BearerParameters
| Parameter | Type | Required | Default |
|---|---|---|---|
file | multipart file | Yes | — |
kind | photo | file | No | file |
title | string (max. 180) | Yes | — |
description | string (max. 3000) | No | — |
price | decimal | Yes | — |
currency | EUR | USD | Yes | USD |
accessPolicy | permanent | timed | limited | No | permanent |
locale | ISO 639-1 | No | en |
curl -X POST "https://api.urlz.li/mobile/v1/monetization/upload.php" \
-H "Authorization: Bearer SESSION_TOKEN" \
-F "file=@./premium-photo.jpg" \
-F "kind=photo" \
-F "title=Premium event photo" \
-F "price=4.90" \
-F "currency=EUR"
{
"id": 92,
"hash": "e71f8a20",
"shortUrl": "https://urlz.li/e71f8a20",
"paywallUrl": "https://urlz.li/en/pay/e71f8a20/"
}
/mobile/v1/monetization/links.phpList paid links
Return paid links with sales, gross revenue, net revenue and status.
Bearercurl "https://api.urlz.li/mobile/v1/monetization/links.php" \
-H "Authorization: Bearer SESSION_TOKEN"
{
"items": [
{
"id": 91,
"shortUrl": "https://urlz.li/cd3ed9a4",
"kind": "url",
"priceMinor": 990,
"currency": "EUR",
"status": "active",
"sales": 4,
"grossMinor": 3960,
"netMinor": 3374
}
]
}
/mobile/v1/monetization/transactions.phpList paid-link sales
Return orders, processor fees, URLZ fees, net revenue and fund-release dates.
Bearercurl "https://api.urlz.li/mobile/v1/monetization/transactions.php" \
-H "Authorization: Bearer SESSION_TOKEN"
{
"items": [
{
"orderNumber": "LNK-20261102-8F3C21",
"grossMinor": 990,
"platformFeeMinor": 69,
"processorFeeMinor": 45,
"netMinor": 876,
"currency": "EUR",
"status": "paid",
"fundsAvailableAt": "2026-11-16 14:32:10",
"fundsStatus": "held"
}
]
}
Errors & status codes
Modern endpoints return JSON with a human-readable message. API-key routes return an error field. Always branch on the HTTP status, not the message text.
{ "message": "A valid link is required." }{ "error": "Invalid API key" }The request completed successfully.
The link or upload was created.
Malformed JSON or invalid request syntax.
The Bearer token is missing or expired.
The API key, plan or account cannot perform this action.
The requested link or resource does not exist.
The requested state conflicts with an existing resource.
One or more fields are missing or invalid.
Slow down and retry with exponential backoff.
Retry later and keep the original request idempotent.
Security & limits
Apply these rules to every production integration.
- Use HTTPS only.
- Keep API keys private and rotate them regularly.
- Validate and encode user-supplied parameters.
- Use pagination for list and log requests.
- Recommended maximum: 10 requests per second per key.
Send the endpoint, HTTP status and a sanitized request example. Never include credentials.
