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

ParameterRequiredDescription
apiKeyYesYour unique API key
linkYesThe original URL you want to shorten (must include http:// or https://)
domainNoDomain code (see domain codes below)
linkTypeNoType of link: ad-link, no-ad, or pass-link
adsNoAds level: 1=mid, 2=high, 3=max
passConditionalPassword for pass-link type (required when linkType is pass-link)

Domain Codes

CodeDomain
1pornhub.gold
2github.help
3shortez.top
4azure.net.im
5viponly.me
6movielink.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

TypeDescription
ad-linkLink with ads
no-adNon-ads link
pass-linkLink with password (requires pass parameter)

Note: If no linkType is provided, ad-link (with ads) will be used by default.

Ads Types

ValueDescription
3max - Maximum ads
2high - High ads
1mid - 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"
}