bash
curl -X POST https://urlz.ca/api/v1/shorten \
-H 'Authorization: Bearer urlz_your_key' \
-H 'Content-Type: application/json' \
-d '{"url":"https://example.com","alias":"optional"}'
API
Create an account, open Developers, generate your single API key (optional 2 IPs + 2 websites allowlist), then authenticate with Authorization: Bearer urlz_....
One API key per account. Create it in Developers after signup. Optional allowlists restrict which client IPs and website origins may use the key.
Create a short URL. Adult/sensitive destinations may return risk_status: WARNING but still create the link.
curl -X POST https://urlz.ca/api/v1/shorten \
-H 'Authorization: Bearer urlz_your_key' \
-H 'Content-Type: application/json' \
-d '{"url":"https://example.com","alias":"optional"}'
<?php
$response = file_get_contents('https://urlz.ca/api/v1/shorten', false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Authorization: Bearer urlz_your_key\r\nContent-Type: application/json",
'content' => json_encode(['url' => 'https://example.com']),
],
]));
$data = json_decode($response, true);
const response = await fetch('https://urlz.ca/api/v1/shorten', {
method: 'POST',
headers: {
Authorization: 'Bearer urlz_your_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: 'https://example.com' }),
});
const data = await response.json();
import requests
response = requests.post(
'https://urlz.ca/api/v1/shorten',
headers={'Authorization': 'Bearer urlz_your_key'},
json={'url': 'https://example.com'},
)
print(response.json())
Encode a short identifier or any http(s) URL as a QR. URLZ never fetches the destination.
curl "https://urlz.ca/api/v1/qr/a7K"
curl "https://urlz.ca/api/v1/qr?url=https://urlz.ca/a7K"
{
"success": false,
"error": {
"code": "INVALID_URL",
"message": "The supplied URL is invalid."
}
}
Common codes: INVALID_URL, RATE_LIMITED, DAILY_QUOTA_EXCEEDED, INVALID_API_KEY, API_IP_NOT_ALLOWED, API_ORIGIN_NOT_ALLOWED.