# Quickstart

Create a Clikso API key in the dashboard, then make your first short link with one request. It takes about two minutes, on any plan.

> **In short:**
>
> Make an API key in the Clikso dashboard. Then send one `POST` request with that key, and you get your new short link back. It works on every plan, including Free.

## You need

* **An account:** A Clikso account. The Free plan is fine.
* **A role:** Admin in the workspace. Only admins can create API keys.
* **A terminal:** Any terminal with `curl`. Or pick one of the eight other languages in the code tabs.

## Make your first link

### Step 1. Create an API key

Sign in at [app.clik.so](https://app.clik.so). Open **Settings**, then the **API** tab, and press **Generate New Key**.

Give the key a name, such as "My script". Tick **Write**, which also gives **Read**. Then press **Generate Key**.

Copy the key now. It starts with `clik_live_`, and Clikso shows it only once.

### Step 2. Save the key in your terminal

Put the key in an environment variable. Every example in these docs reads it from there, so the key never sits in your code.

```bash title="macOS and Linux"
export CLIKSO_API_KEY="clik_live_your_key_here"
```

```powershell title="Windows PowerShell"
$env:CLIKSO_API_KEY = "clik_live_your_key_here"
```

### Step 3. Create a short link

Send this request. Only `destination_url` is required. Leave out `short_code` and Clikso picks a random 7-character one.

```bash
curl -X POST "https://app.clik.so/api/links" \
  -H "Authorization: Bearer $CLIKSO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destination_url": "https://example.com/summer-sale",
    "short_code": "summer-sale"
  }'
```

Response 201:

```json
{
  "status": 201,
  "success": true,
  "message": "Link created successfully",
  "data": {
    "id": "3f6c1a2e-9b4d-4e8f-a1c2-7d9e0f1a2b3c",
    "workspace_id": "8a1f2c3d-4b5e-4f60-9a7b-1c2d3e4f5a6b",
    "custom_domain_id": null,
    "domain": "clik.is",
    "domain_status": "default",
    "title": "",
    "description": "",
    "short_code": "summer-sale",
    "destination_url": "https://example.com/summer-sale",
    "status": "active",
    "expires_at": null,
    "expired_redirect_url": null,
    "folder_id": null,
    "ab_testing": [],
    "geo_targeting": null,
    "device_targeting": null,
    "qr_metadata": null,
    "og_preview": null,
    "meta_pixel_id": null,
    "tiktok_pixel_id": null,
    "ga4_measurement_id": null,
    "gtm_container_id": null,
    "has_password": false,
    "click_count": 0,
    "created_by": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
    "created_at": "2026-10-09T09:30:00.000Z",
    "updated_at": "2026-10-09T09:30:00.000Z",
    "tags": [],
    "creator": {
      "id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e7f",
      "display_name": "Asha Rao",
      "email": "asha@example.com",
      "photo_url": ""
    }
  }
}
```

### Step 4. Open your short link

The API does not send back a full short URL. You build it from two fields: `https://` + `domain` + `/` + `short_code`.

For the link above, that is `https://clik.is/summer-sale`. Open it, and it sends you to the destination.

## What you get back

A `201` status and a JSON body. The body is the same shape for every call: `status`, `success`, `message` and `data`. Here `data` is your new link.

The fields you will use most:

* `id` — the link's id. Use it to read, change or delete the link later.
* `domain` and `short_code` — together they make the short URL.
* `destination_url` — where the link sends people.
* `click_count` — how many clicks the link has had so far.

Every field is listed on [Create a link](https://clik.so/docs/api/links/create-link).

## Common errors

| Status | Code                  | What it means                                                                         | What to do                                                                                               |
| ------ | --------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| 401    | `UNAUTHORIZED`        | The key is missing or wrong. Check that `CLIKSO_API_KEY` is set in this terminal.     | Send `Authorization: Bearer clik_live_…` with a key from Settings → API.                                 |
| 403    | `FORBIDDEN`           | The key only has Read permission. Make a key with Write.                              | Check the key’s permission and your role. If you send `Workspace-Id`, it must match the key’s workspace. |
| 409    | `CONFLICT`            | Someone already uses that `short_code` on that domain. Pick another, or leave it out. | Pick another `short_code`, or leave it out to get a random one.                                          |
| 422    | `VALIDATION_ERROR`    | `destination_url` is missing, or does not start with `http://` or `https://`.         | Fix the field and send the request again.                                                                |
| 429    | `USAGE_LIMIT_REACHED` | You have made all the links your plan allows this month.                              | Wait for the reset (analytics sends `details.resets_at`) or upgrade.                                     |

## Good to know

* The base URL for every call is `https://app.clik.so/api`.
* A key belongs to one workspace. Links you make with it land in that workspace.
* Never put a key in a web page or a mobile app. Anyone can read it there. See [Keep your API key safe](https://clik.so/docs/guides/api-key-safety).
* On the Free plan you can make 50 links a month and send 30 requests a minute. See [Limits](https://clik.so/docs/limits) for every plan.

## Next steps

---

Source: https://clik.so/docs/quickstart
