API
Create and manage short links from your own code. The API is part of the Pro plan.
Authentication
Create a key on your account page and send it in the Authorization header of every request. Keep the key secret: anyone with it can manage your links.
Authorization: Bearer skr_…
Endpoints
| POST | /api/v1/links | Create a link |
| GET | /api/v1/links | List your links (limit, offset) |
| GET | /api/v1/links/{slug} | Get one link |
| PATCH | /api/v1/links/{slug} | Change expiry or open limit |
| DELETE | /api/v1/links/{slug} | Delete a link |
| GET | /api/v1/links/{slug}/stats | Daily totals and top countries, devices, browsers and sources (days = 1–365) |
Create a link
curl -X POST https://skr.me/api/v1/links \
-H "Authorization: Bearer $SKR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/page?utm_source=news", "slug": "launch", "expires": "never"}'
Send JSON or form data. Only url is required.
| url | The destination address (http or https). |
| slug | Optional custom address, at least 4 characters. |
| password | Optional password visitors must enter. |
| expires | 1h, 1d, 7d, 14d, 30d, 60d, 90d or never (default). |
| max_clicks | Optional number of opens after which the link stops working. |
| clean | Remove tracking parameters from the destination. Default true. |
Response
HTTP/1.1 201 Created
{
"link": {
"slug": "launch",
"short_url": "https://skr.me/launch",
"target_url": "https://example.com/page",
"status": "ok",
"custom": true,
"password_protected": false,
"clicks": 0,
"max_clicks": null,
"created_at": "2026-09-26T12:00:00+00:00",
"expires_at": null
},
"removed_parameters": ["utm_source"]
}
Statistics
curl https://skr.me/api/v1/links/launch/stats?days=30 \
-H "Authorization: Bearer $SKR_KEY"
Statistics are the same daily aggregates you see on the dashboard. They never contain information about individual visitors.
Errors
Errors use standard HTTP status codes (400, 401, 403, 404, 422, 429) and a JSON body with a machine-readable code.
{ "error": { "code": "invalid_slug", "field": "slug", "message": "This address is already taken." } }
Limits
Each key can make 1000 requests per day. Every response includes X-RateLimit-Limit and X-RateLimit-Remaining headers.