> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kealinks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From nothing to a printed QR code in four calls.

## 1. Get a key

Sign in at [kealinks.com/dashboard](https://kealinks.com/dashboard), then mint a
key. It is shown exactly once and stored hashed — if you lose it, we cannot
recover it for you.

```bash theme={null}
curl -X POST https://api.kealinks.com/api/billing/claim \
  -H "Authorization: Bearer $SESSION_TOKEN"
```

```json theme={null}
{ "api_key": "klk_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }
```

<Note>
  Prefer not to have an account at all? Skip this page and read
  [Paying as an agent](/agent-payments) instead. A machine payment mints the
  account and the key for you in the same call that creates your first link.
</Note>

## 2. Create a link

```bash theme={null}
curl -X POST https://api.kealinks.com/api/links \
  -H "Authorization: Bearer $KEALINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destination": "https://example.com/spring-menu"}'
```

```json theme={null}
{
  "id": "lnk_2YgQk1p8fT3mN7wCxRvBdLsHjZa",
  "slug": "m4rq7bd",
  "destination": "https://example.com/spring-menu",
  "host": null,
  "status": 1
}
```

Your code is `https://kea.link/m4rq7bd`.

`status: 1` is quarantine, and it is normal — every link starts there. It
resolves exactly like any other link; the difference is invisible to whoever
scans it. See [Quarantine](/quarantine).

<Tip>
  Omit `slug` and we allocate one from an alphabet with no `0`/`O` and no
  `1`/`l`/`I`, because people read these off printed material and type them in.
  Pass your own `slug` if you want a specific one.
</Tip>

## 3. Download the artwork

```bash theme={null}
curl "https://api.kealinks.com/api/links/lnk_2YgQ.../qr?format=svg&size=1024" \
  -H "Authorization: Bearer $KEALINK_API_KEY" \
  -o code.svg
```

`format` is `svg`, `png` or `eps`. Print shops usually want EPS or SVG. The value
encoded in the code is the short link, never the destination — that indirection
is the entire product, and a code that encoded the destination directly could
never be repointed.

You can also set a centre logo (`POST /api/links/{id}/logo`). A logo may cover at
most 20% of the code area; anything larger stops scanning reliably once ink
spreads on physical stock. Codes with a logo are always rendered at error
correction `H`.

## 4. Repoint it, later

The menu moved. The code on 5,000 printed placemats does not have to.

```bash theme={null}
curl -X PATCH https://api.kealinks.com/api/links/lnk_2YgQ... \
  -H "Authorization: Bearer $KEALINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destination": "https://example.com/summer-menu"}'
```

Every scan from that moment forward goes to the new destination. The old one is
gone; nothing about the printed code changed.

## What you cannot do

There is no `DELETE /api/links/{id}`, and there never will be. `POST
/api/links/{id}/archive` hides a link from your dashboard, and the code keeps
resolving. That is not an oversight — see [Permanence](/permanence).
