Authentication
All API requests require a Bearer token. Generate an API key from your Dashboard → API Keys.
# Include this header in every request
Authorization: Bearer YOUR_API_KEY
Rate limit: 60 requests per minute per API key.
Base URL
https://short10.app
Endpoints
GET /api/v1/links
Retrieve a paginated list of your short links.
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | optional | Page number (default: 1, 20 per page) |
# Example
curl -s "https://short10.app/api/v1/links?page=1" \ -H "Authorization: Bearer YOUR_API_KEY"
Response example
{ "data": [ { "id": 42, "short_code": "AbC123", "destination_url": "https://example.com", "title": "Example", "is_active": 1, "total_clicks": 156, "unique_clicks": 89, "created_at": "2025-01-15 10:30:00" } ], "total": 1, "page": 1
}
POST /api/v1/links
Create a new short link.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | required | Destination URL |
title | string | optional | Link title (auto-generated from URL if omitted) |
short_code | string | optional | Custom short code (3-50 chars: letters, numbers, - or _; must start alphanumeric) |
# Example
curl -s -X POST "https://short10.app/api/v1/links" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/my-page", "title": "My Page"}'
Response example (201 Created)
{ "id": 43, "short_url": "https://short10.app/AbC456", "short_code": "AbC456", "destination_url": "https://example.com/my-page", "title": "My Page"
}
GET /api/v1/links/stats?id={id}
Get detailed click analytics for a specific link.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | required | Link ID |
# Example
curl -s "https://short10.app/api/v1/links/stats?id=42" \ -H "Authorization: Bearer YOUR_API_KEY"
Response example
{ "link": { "id": 42, "short_code": "AbC123", "total_clicks": 156, "unique_clicks": 89 }, "clicks_by_period": [ {"date": "2025-01-15", "total": 23, "uniques": 18} ], "countries": [ {"country": "US", "total": 45}, {"country": "GB", "total": 12} ]
}
DELETE /api/v1/links/delete?id={id}
Permanently delete a link and all its click data.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | required | Link ID |
# Example
curl -s -X DELETE "https://short10.app/api/v1/links/delete?id=42" \ -H "Authorization: Bearer YOUR_API_KEY"
Response example
{"deleted": true}
Error Codes
| Code | Meaning |
|---|---|
401 | Missing or invalid API key |
403 | Plan limit reached |
404 | Resource not found |
409 | Short code already taken |
422 | Invalid input (bad URL, invalid short code format) |
429 | Rate limit exceeded (60 req/min) |
Need help? Contact support or generate your API key