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/v1

Authentication

All API requests require authentication. You can authenticate using:

  1. 1.API Key (recommended for server-to-server) — pass in the Authorization header
  2. 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

MethodEndpointDescription
POST/api/v1/linksCreate a new short link
GET/api/v1/linksList all your links
GET/api/v1/links/:codeGet a specific link
DELETE/api/v1/links/:codeDelete a link

Rate Limiting

API requests are rate-limited based on your plan. See Rate Limiting for details.

HTTP Status Codes

CodeMeaning
200Success
201Resource created
204Deleted (no content)
400Bad request / validation error
401Missing or invalid authentication
403Forbidden (plan limit reached)
409Conflict (short code taken)
429Rate limit exceeded
500Internal server error