The ShortU REST API lets you shorten URLs, manage links and retrieve analytics programmatically.
Base URL: https://stu.cm/api/v1/
Authentication:
All API requests require an API token in the Authorization header:
Authorization: Token YOUR_TOKEN_HERE
Get your token from the API Tokens page in your dashboard.
Key endpoints:
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/shorten |
Shorten a URL |
GET |
/api/v1/links |
List all your links |
GET |
/api/v1/shorten/{code} |
Get stats for a link |
PATCH |
/api/v1/shorten/{code} |
Update a link (title, URL, expiry) |
DELETE |
/api/v1/shorten/{code} |
Delete a link |
POST |
/api/v1/shorten/bulk |
Shorten multiple URLs at once |
GET |
/api/v1/check |
Check if a URL is safe |
Shorten a URL — example:
POST /api/v1/shorten
{
"url": "https://example.com/very-long-path",
"title": "My campaign link",
"custom_code": "promo-oct"
}
Response:
{
"short_url": "https://stu.cm/promo-oct",
"code": "promo-oct",
"qr_code_url": "https://stu.cm/qr/promo-oct/png/300"
}
Rate limits:
| Plan | Requests per minute |
|---|---|
| Free | 6 |
| Starter | 30 |
| Pro | 120 |
Error responses:
| HTTP status | Meaning |
|---|---|
| 400 | Invalid or missing parameters |
| 401 | Missing or invalid API token |
| 403 | Plan does not allow this action |
| 429 | Rate limit exceeded |
For the full interactive reference, see the Swagger documentation.