API Overview
The Shrinkr API lets you create, list, and manage short links programmatically. All endpoints return JSON and follow REST conventions.
Base URL
https://shrinkr.nl/api/v1Authentication
All API requests require authentication. You can authenticate using:
- 1.API Key (recommended for server-to-server) — pass in the
Authorizationheader - 2.Session cookie — automatic when using the dashboard
See Authentication for details on generating and using API keys.
Response Format
All successful responses return JSON with the relevant data. Error responses follow a consistent structure:
json
{
"error": {
"code": "LINK_LIMIT_REACHED",
"message": "You have reached the maximum number of links for your plan.",
"status": 403
}
}Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/links | Create a new short link |
GET | /api/v1/links | List all your links |
GET | /api/v1/links/:code | Get a specific link |
DELETE | /api/v1/links/:code | Delete a link |
Rate Limiting
API requests are rate-limited based on your plan. See Rate Limiting for details.
HTTP Status Codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Resource created |
204 | Deleted (no content) |
400 | Bad request / validation error |
401 | Missing or invalid authentication |
403 | Forbidden (plan limit reached) |
409 | Conflict (short code taken) |
429 | Rate limit exceeded |
500 | Internal server error |