Developer API Reference
Automate branded short link creation using our simple HTTP REST API. Perfect for product integrations, campaigns, and dashboards.
Authentication
Authenticate your requests by passing your generated API key in the headers. You can generate API credentials directly inside the API Keys Dashboard.
Shorten URL
https://ul0.site/api/shortenSubmit a payload containing the target URL. If a connected custom domain is specified, we check ownership, register the record in your account, and create a short URL targeting your custom link.
| Parameter | Type | Required | Description |
|---|---|---|---|
| longUrl | string | Yes | The full destination web address to redirect readers to. |
| host | string | No | Connected custom domain (e.g., link.yourbrand.com). Defaults to ul0.site. |
| customSlug | string | No | Desirable slug identifier (path component). Auto-generated if omitted. |
Request Integration Samples
curl -X POST https://ul0.site/api/shorten \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"longUrl": "https://example.com/very-long-product-details-link",
"host": "link.yourbrand.com",
"customSlug": "summer-promo"
}'Rate Limits
Programmatic requests carry different rate limits depending on your subscribed account tier:
Error Responses
The API will return appropriate HTTP response status codes along with descriptive JSON error objects if a call fails:
Occurs if the API key header is missing or incorrect.
Occurs if attempting to shorten on a custom domain (`host`) that is not connected or verified on your account.
Occurs if the requested `customSlug` is already taken on that domain.
Occurs if you exceed the minute rate limit associated with your active plan.