Overzicht
Bouw korte links, uploads, statistieken en betaalde toegang met de URLZ-API. Deze referentie scheidt serverintegraties met API-sleutel van aangemelde accountsessies.
Server-naar-server
Gebruik je actieve sleutel vanuit een backend, automatisering of intern hulpmiddel.
apikey=YOUR_API_KEYAccountsessie
Gebruik Bearer voor accountlinks, uploads, statistieken en inkomsten.
Authorization: Bearer …Snel starten
Maak in drie stappen je eerste korte link en gebruik daarna de volledige referentie.
- 1Account maken
Open het dashboard en activeer een API-abonnement.
- 2API-sleutel kopiëren
Bewaar hem op je server en nooit in openbare code.
- 3Verzoek verzenden
Stuur de bestemming en lees result.short_url uit de JSON-respons.
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"])
Authenticatie
URLZ ondersteunt twee authenticatiemethoden. Kies wat bij je integratie past.
API-sleutel
Voor backends. Stuur apikey in de URL of formulierbody; sleutel en abonnement moeten actief zijn.
apikey=YOUR_API_KEYBearer-sessie
Voor accountfuncties. Vraag een token op bij aanmelden en stuur dit in Authorization.
Authorization: Bearer SESSION_TOKENPubliceer nooit sleutels, wachtwoorden of tokens in JavaScript, logs, versiebeheer of openbare repositories.
Endpointoverzicht
Kies een endpoint voor parameters en voorbeelden.
/url/createKorte link maken
GET/url/listLinks tonen en filteren
POST/mobile/v1/auth/login.phpAccountsessie openen
POST/mobile/v1/shorten.phpAccountlink maken
POST/mobile/v1/upload.phpBestand of foto uploaden
GET/mobile/v1/links.phpAccountlinks tonen
GET/mobile/v1/clicks.phpKlikstatistieken lezen
DELETE/mobile/v1/delete-link.phpLink verwijderen
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.phpBetaallink maken of omzetten
POST/mobile/v1/monetization/upload.phpBetaald bestand of foto maken
GET/mobile/v1/monetization/links.phpBetaallinks tonen
GET/mobile/v1/monetization/transactions.phpVerkopen tonen
API-sleutel-endpoints
Stabiele serverroutes om korte links te maken en zoeken.
/url/createKorte link maken
Maakt een korte URL met actieve API-sleutel.
apikeyParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
apikey | string | Ja | — |
fullUrl | URL | Ja | — |
encrypt | string | Nee | "" |
password | string | Nee | "" |
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/listLinks tonen en filteren
Geeft links met filters en paginering.
apikeyParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
apikey | string | Ja | — |
limit | integer (1–1000) | Nee | 100 |
offset | integer | Nee | 0 |
order | asc | desc | Nee | desc |
date | YYYY-MM-DD | Nee | — |
from_date | YYYY-MM-DD | Nee | — |
to_date | YYYY-MM-DD | Nee | — |
url_destination | string | Nee | — |
hash | string | Nee | — |
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
Accountlinks, uploads, klikken en verwijderen.
/mobile/v1/auth/login.phpAccountsessie openen
Wisselt accountgegevens in voor Bearer-token.
Geen authenticatieParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
email | Ja | — | |
password | string | Ja | — |
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.phpAccountlink maken
Maakt gewone of beveiligde link; Bearer is optioneel behalve met wachtwoord.
Optioneel Bearer-tokenParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
url | URL | Ja | — |
password | string (min. 4) | Nee | — |
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.phpBestand of foto uploaden
Uploadt toegestaan bestand tot 10 MB.
Optioneel Bearer-tokenParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
file | multipart file | Ja | — |
kind | photo | document | Nee | document |
password | string (min. 4) | Nee | — |
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.phpAccountlinks tonen
Toont links, klikken, beveiliging en inkomstenstatus.
BearerParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
limit | integer (1–100) | Nee | 100 |
offset | integer | Nee | 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.phpKlikstatistieken lezen
Geeft klikken, bezoekers, landen en gebeurtenissen.
BearerParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
linkId | integer | Ja | — |
limit | integer (1–100) | Nee | 100 |
offset | integer | Nee | 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.phpLink verwijderen
Verwijdert alleen een link van het account.
BearerParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
hash | string | Ja | — |
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 | Verplicht | Standaard |
|---|---|---|---|
hash | string | Ja | — |
chat.enabled | boolean | Nee | false |
request.enabled | boolean | Nee | false |
request.title | string | Nee | — |
request.items | string[] | Nee | [] |
request.recipients | email[] | Nee | [] |
request.deadline | ISO datetime | Nee | — |
request.paymentRequired | boolean | Nee | 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 | Verplicht | Standaard |
|---|---|---|---|
id | integer | Nee | — |
after | integer | Nee | 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 | Verplicht | Standaard |
|---|---|---|---|
id | integer | Nee | — |
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}]}
Betaallink-endpoints
Maak betaalde toegang en lees verkoopgegevens.
/mobile/v1/monetization/links.phpBetaallink maken of omzetten
Maakt betaalde URL of zet bestaande link om.
BearerParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
destination | URL | Nee | — |
existingLinkId | integer | Nee | — |
title | string (max. 180) | Ja | — |
description | string (max. 3000) | Nee | — |
price | decimal | Ja | — |
currency | EUR | USD | Ja | USD |
accessPolicy | permanent | timed | limited | Nee | permanent |
accessDurationHours | integer (1–8760) | Nee | 24 |
maxAccesses | integer (1–1000) | Nee | 1 |
locale | ISO 639-1 | Nee | 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.phpBetaald bestand of foto maken
Slaat bestand privé op en maakt betaallink, maximaal 50 MB.
BearerParameters
| Parameter | Type | Verplicht | Standaard |
|---|---|---|---|
file | multipart file | Ja | — |
kind | photo | file | Nee | file |
title | string (max. 180) | Ja | — |
description | string (max. 3000) | Nee | — |
price | decimal | Ja | — |
currency | EUR | USD | Ja | USD |
accessPolicy | permanent | timed | limited | Nee | permanent |
locale | ISO 639-1 | Nee | 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.phpBetaallinks tonen
Geeft betaallinks, verkopen, bruto, netto en 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.phpVerkopen tonen
Geeft orders, kosten, netto-omzet en vrijgavedata.
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"
}
]
}
Fouten en HTTP-codes
Moderne endpoints geven message terug; API-sleutelroutes gebruiken error. Baseer logica op de HTTP-status.
{ "message": "A valid link is required." }{ "error": "Invalid API key" }Verzoek voltooid.
Link of bestand gemaakt.
JSON of syntaxis is ongeldig.
Token ontbreekt of is verlopen.
Sleutel, abonnement of account heeft geen toegang.
Bron bestaat niet.
Status conflicteert.
Velden ontbreken of zijn ongeldig.
Vertraag en probeer later.
Probeer later idempotent opnieuw.
Beveiliging en limieten
Pas deze regels toe in productie.
- Gebruik uitsluitend HTTPS.
- Houd API-sleutels privé en vernieuw ze regelmatig.
- Valideer en codeer parameters van gebruikers.
- Gebruik paginering voor lijsten en logs.
- Aanbevolen maximum: 10 verzoeken per seconde per sleutel.
Stuur endpoint, HTTP-status en een opgeschoond voorbeeld zonder gegevens.
