Complete API Reference for Link Management and Premium Features
Version 1.0 | RESTful JSON API
The SHORT.BID API supports two authentication methods:
Include your API key in the request header:
X-API-Key: your_api_key_here
Or as a Bearer token:
Authorization: Bearer your_api_key_here
If you're authenticated via the web interface, requests will automatically use your session cookie.
Request:
{
"action": "generateApiKey"
}
Response:
{
"success": true,
"apiKey": "abc123...",
"message": "API key generated successfully. Keep it secure!"
}
https://short.bid/api.php
All endpoints accept JSON in the request body and return JSON responses.
Action: createLink
Description: Create a new short link
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The destination URL to shorten |
| customSlug | string | No | Custom short link text PREMIUM |
| noReferer | integer | No | 1 to hide referer, 0 otherwise PREMIUM |
| postMethod | integer | No | 1 for POST redirect, 0 for GET PREMIUM |
| customDomain | string | No | Custom domain name PREMIUM |
Example Request:
{
"action": "createLink",
"url": "https://example.com/very/long/url",
"customSlug": "my-link",
"noReferer": 1,
"postMethod": 0
}
Example Response:
{
"success": true,
"linkId": 123,
"shortUrl": "https://short.bid/my-link",
"customSlug": "my-link"
}
Action: getLinks
Description: Retrieve all your short links
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Maximum number of links to return (default: 100) |
Example Request:
{
"action": "getLinks",
"limit": 50
}
Example Response:
{
"success": true,
"links": [
{
"linkId": 123,
"linkUrl": "https://example.com",
"linkCustomSlug": "my-link",
"linkNoReferer": 1,
"linkPostMethod": 0,
"linkCustomDomain": null,
"linkCreatedDate": "2025-12-25 10:30:00",
"clicks": 42,
"shortUrl": "https://short.bid/my-link"
}
],
"count": 1
}
Action: getLink
Description: Get details of a specific link
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| linkId | integer | Yes | The ID of the link to retrieve |
Example Request:
{
"action": "getLink",
"linkId": 123
}
Action: updateLink
Description: Update link properties
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| linkId | integer | Yes | The ID of the link to update |
| updates | object | Yes | Object containing fields to update |
Example Request:
{
"action": "updateLink",
"linkId": 123,
"updates": {
"linkNoReferer": 1,
"linkCustomDomain": "example.com"
}
}
Action: deleteLink
Description: Delete a short link
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| linkId | integer | Yes | The ID of the link to delete |
Example Request:
{
"action": "deleteLink",
"linkId": 123
}
Bulk operations allow you to update or delete multiple links at once. Premium subscription required.
Action: bulkUpdate
Description: Update multiple links at once
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| linkIds | array | Yes | Array of link IDs to update |
| updates | object | Yes | Object containing fields to update |
Example: Set all links to no-referer
{
"action": "bulkUpdate",
"linkIds": [1, 2, 3, 4, 5],
"updates": {
"linkNoReferer": 1
}
}
Example: Change domain for multiple links
{
"action": "bulkUpdate",
"linkIds": [10, 20, 30],
"updates": {
"linkCustomDomain": "custom.example.com"
}
}
Example: Set multiple links to POST method
{
"action": "bulkUpdate",
"linkIds": [7, 8, 9],
"updates": {
"linkPostMethod": 1
}
}
Example Response:
{
"success": true,
"message": "Bulk update completed",
"updated": 5,
"total": 5
}
Action: bulkDelete
Description: Delete multiple links at once
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| linkIds | array | Yes | Array of link IDs to delete |
Example Request:
{
"action": "bulkDelete",
"linkIds": [1, 2, 3, 4, 5]
}
Example Response:
{
"success": true,
"message": "Bulk delete completed",
"deleted": 5,
"total": 5
}
Action: getStats
Description: Get your account statistics
Example Request:
{
"action": "getStats"
}
Example Response:
{
"success": true,
"stats": {
"monthlyTraffic": 1250,
"totalTraffic": 15420,
"totalLinks": 42,
"isPremium": true,
"subscription": {
"planName": "Premium Annual",
"planSlug": "premium-annual",
"subscriptionStatus": "active"
}
}
}
Action: getUser
Description: Get your user account information
Example Request:
{
"action": "getUser"
}
Example Response:
{
"success": true,
"user": {
"userId": 1,
"userEmail": "user@example.com",
"isPremium": true,
"subscription": {
"planName": "Premium Annual",
"subscriptionStatus": "active"
}
}
}
All errors return a JSON response with an error field:
| HTTP Code | Description | Example |
|---|---|---|
| 400 | Bad Request | Missing required parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Premium feature requires subscription |
| 404 | Not Found | Link not found or access denied |
Example Error Response:
{
"error": "Authentication required. Please provide API key or login."
}
curl -X POST https://short.bid/api.php \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"action": "createLink",
"url": "https://example.com",
"noReferer": 1
}'
fetch('https://short.bid/api.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
},
body: JSON.stringify({
action: 'createLink',
url: 'https://example.com',
noReferer: 1
})
})
.then(response => response.json())
.then(data => console.log(data));
import requests
headers = {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
}
data = {
'action': 'createLink',
'url': 'https://example.com',
'noReferer': 1
}
response = requests.post(
'https://short.bid/api.php',
headers=headers,
json=data
)
print(response.json())
$ch = curl_init('https://short.bid/api.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: your_api_key_here',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'action' => 'createLink',
'url' => 'https://example.com',
'noReferer' => 1
]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
Currently, there are no enforced rate limits, but please use the API responsibly.
If abuse is detected, rate limiting may be implemented in the future.
For API support or questions, please contact us at info@short.bid
Premium users receive priority support for API-related issues.