Developer
GET STARTED

Quickstart

Create a scoped API key and your first branded short link in a few minutes, with copy-paste examples in curl, JavaScript, Python and PHP.

Before you begin

You need a ShortFreeURL account, at least one active domain and an API key. Every plan includes REST API access. The plan controls the lifetime API-created link allowance and the per-key request rate. Website-created links have a separate allowance.

Use a test domain first.Create and edit test links before automating a production campaign.

1. Create a secret API key

Open Dashboard → Integrations & API → API, choose a descriptive name, select a scope and create the key. The secret is shown once.

export SHORTFREEURL_API_KEY='ms_live_…'

2. Create a link

curl --request POST 'https://api.shortfreeurl.com/api/links' \
  --header "Authorization: Bearer $SHORTFREEURL_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "original_url": "https://example.com/summer",
  "domainId": 42,
  "path": "summer",
  "title": "Summer launch",
  "tags": [
    "launch",
    "paid"
  ]
}'

3. Read the response

A successful create returns the link id, complete short URL, destination, title, tags and every configured targeting or lifecycle field. Store the id for future updates.

{
  "id": 918,
  "shortURL": "https://go.example.com/summer",
  "originalURL": "https://example.com/summer",
  "clicks": 0,
  "archived": false
}

Next steps