Shortez API
Create short links programmatically using our simple REST API. Generate links with custom domains, ad types, and password protection.
Your API Key
Keep your API key secret. Do not share it publicly or expose it in client-side code.
API Documentation
Endpoint
POST/api/create-link
Important Notes
- All requests must be sent as JSON using the POST method
- You can only create links via API. Withdrawals, balance checks, and other account operations are not available through API.
- Temporary links (tmplink.xyz) cannot be created via API.
Parameters
| Parameter | Required | Description |
|---|---|---|
| apiKey | Yes | Your unique API key |
| link | Yes | The original URL you want to shorten (must include http:// or https://) |
| domain | No | Domain code (see domain codes below) |
| linkType | No | Type of link: ad-link, no-ad, or pass-link |
| ads | No | Ads level: 1=mid, 2=high, 3=max |
| pass | Conditional | Password for pass-link type (required when linkType is pass-link) |
Domain Codes
| Code | Domain |
|---|---|
| 1 | pornhub.gold |
| 2 | github.help |
| 3 | shortez.top |
| 4 | azure.net.im |
| 5 | viponly.me |
| 6 | movielink.click |
Note: If no domain is provided, shortez.top will be used by default. Temporary links (tmplink.xyz) are not available via API.
Link Types
| Type | Description |
|---|---|
| ad-link | Link with ads |
| no-ad | Non-ads link |
| pass-link | Link with password (requires pass parameter) |
Note: If no linkType is provided, ad-link (with ads) will be used by default.
Ads Types
| Value | Description |
|---|---|
| 3 | max - Maximum ads |
| 2 | high - High ads |
| 1 | mid - Medium ads |
Note: If no ads value is provided, 3 (max) will be used by default. This setting is ignored when linkType is set to no-ad or pass-link.
Example: Create Link with Ads
Request
curl -X POST https://shortez.net/api/create-link \
-H "Content-Type: application/json" \
-d '{"apiKey": "YOUR_API_KEY", "link": "https://example.com", "domain": 3, "linkType": "ad-link", "ads": 3}'Response
{
"success": true,
"message": "Link created successfully",
"link": {
"shortCode": "0abc123",
"shortUrl": "https://shortez.top/0abc123",
"originalUrl": "https://example.com",
"linkType": "ad-link",
"domain": "shortez.top",
"ads": "max",
"password": false,
"createdAt": "2024-01-01T00:00:00.000Z"
}
}Example: Create Password Protected Link
Request
curl -X POST https://shortez.net/api/create-link \
-H "Content-Type: application/json" \
-d '{"apiKey": "YOUR_API_KEY", "link": "https://example.com", "linkType": "pass-link", "pass": "mypassword"}'Response
{
"success": true,
"message": "Link created successfully",
"link": {
"shortCode": "0abc456",
"shortUrl": "https://shortez.top/0abc456",
"originalUrl": "https://example.com",
"linkType": "pass-link",
"domain": "shortez.top",
"ads": "max",
"password": true,
"createdAt": "2024-01-01T00:00:00.000Z"
}
}Example: Create Non-Ads Link
Request
curl -X POST https://shortez.net/api/create-link \
-H "Content-Type: application/json" \
-d '{"apiKey": "YOUR_API_KEY", "link": "https://example.com", "linkType": "no-ad"}'Response
{
"success": true,
"message": "Link created successfully",
"link": {
"shortCode": "0abc789",
"shortUrl": "https://shortez.top/0abc789",
"originalUrl": "https://example.com",
"linkType": "no-ad",
"domain": "shortez.top",
"ads": "mid",
"password": false,
"createdAt": "2024-01-01T00:00:00.000Z"
}
}Error Response
Invalid Request
{
"error": "Invalid request"
}Missing Required Parameter
{
"error": "link parameter is required"
}Invalid Domain Code
{
"error": "Invalid domain code. Use: 1=pornhub.gold, 2=github.help, 3=shortez.top, 4=azure.net.im, 5=viponly.me, 6=movielink.click"
}Missing Password
{
"error": "pass parameter is required when using pass-link type"
}