For Developers

A URL shortener with a real API

Integrate link shortening into your app in minutes. Full REST API, Bearer token auth, OpenAPI docs, and analytics endpoints — available on the free plan.

Shorten a URL in one API call

curl -X POST https://shortfy.co/api/links \
  -H "Authorization: Bearer rl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-long-url.com/path?with=params",
    "alias": "my-link",
    "expiresAt": "2026-12-31T23:59:59Z"
  }'

# Response
{
  "shortCode": "my-link",
  "shortUrl": "https://shortfy.co/my-link",
  "originalUrl": "https://your-long-url.com/path?with=params",
  "createdAt": "2026-04-26T10:00:00Z"
}

API capabilities

Bearer token auth

Authenticate with a Bearer token (API key). Create and manage multiple API keys from your dashboard, each with a custom name.

Create short links

POST a URL to create a short link. Optionally set a custom alias, expiration date, and title — all in a single request.

Retrieve analytics

GET click counts, 30-day time series, top referrers, and (on Pro) geo & device breakdowns for any of your links.

OpenAPI / Swagger docs

Full interactive API docs at /docs. Every endpoint is documented with request/response schemas and live try-it-out functionality.

List & manage links

GET your full link list with pagination, update link metadata, or deactivate links programmatically.

Rate limits by plan

Free plan includes API access with a sensible rate limit. Pro and Business plans raise the limit for higher-volume applications.

What developers build with Shortfy

✓

Automated link generation

Generate short links programmatically in your backend — for transactional emails, notifications, onboarding flows, or any place you share links at scale.

✓

Marketing automation

Integrate with your CRM or marketing platform to automatically shorten and track campaign links before they go out.

✓

Analytics dashboards

Pull click data from the Shortfy API into your own internal dashboards or reporting tools via the analytics endpoints.

✓

Link management tools

Build internal tooling that lets your team create, organise, and monitor links without everyone needing to log in to Shortfy directly.

Start building in minutes

Create a free account, generate an API key, and make your first API call. No credit card needed.