# Integrations

Source: https://developers.leonai.io/docs/integrations/

These apps will connect LeonAI Links to no-code platforms and your browser. **None of them
is published yet**: until they are, call the [REST API](https://developers.leonai.io/docs/api-reference/) directly. All
of them authenticate with an **API key** (`X-API-Key`) — create one in the dashboard under
**Settings → API Keys** with the scopes noted below.

## Zapier

:::warning[Not published yet]
The LeonAI Zapier app is not in Zapier's app directory yet, so you can't add it to a Zap.
Until it is, call the [REST API](https://developers.leonai.io/docs/api-reference/) from a **Webhooks by Zapier** step
with your key in an `X-API-Key` header. The triggers and actions below are what the app will
offer.
:::

The LeonAI Zapier app (Platform v15 CLI app, custom API-key auth) exposes:

| Kind    | Name          | Does                                |
| ------- | ------------- | ----------------------------------- |
| Trigger | New Link      | Polls for newly created links       |
| Trigger | Link Clicked  | Instant (webhook) on `link.clicked` |
| Action  | Create Link   | `POST /api/v1/links`                |
| Action  | Update Link   | `PATCH /api/v1/links/:shortCode`    |
| Action  | Delete Link   | `DELETE /api/v1/links/:shortCode`   |
| Search  | Find Link     | `GET /api/v1/links?search=`         |
| Search  | Get Analytics | `GET /api/v1/analytics/links/:id`   |

**Scopes:** `links:read`, `links:write`, `analytics:read`, and `webhooks:write` (only
for the "Link Clicked" instant trigger).

Publishing the app (maintainers) is a CLI push — no ZIP:

```bash
cd packages/integrations/zapier
npm install
npx zapier validate
npx zapier login
npx zapier register "LeonAI Short Link"   # first time only
npx zapier push
```

## Make.com

:::warning[Not published yet]
The LeonAI Make app is not in Make's app directory yet, so you can't add its modules to a
scenario. Until it is, call the [REST API](https://developers.leonai.io/docs/api-reference/) from Make's **HTTP** module
with your key in an `X-API-Key` header. The modules below are what the app will offer.
:::

The **LeonAI Short Link** Make app covers everything an API key can do: 47 modules, including
**Make an API Call** for anything without a dedicated module.

| Area                  | Modules                                                                                                                                                                        |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Links                 | Create, Update, Delete, Get a Link · Find a Link by Short Code · Search Links · Create Links in Bulk · Move Links to a Folder · Generate a QR Code (PNG/SVG file)              |
| Folders               | List, Create, Update, Delete                                                                                                                                                   |
| Analytics             | Get Link Analytics · Get Account Analytics · Get Link Conversion Report · Get Conversion Summary · Record a Conversion · Get A/B Test Report · Share / Revoke public analytics |
| Custom domains        | List, Get, Add, Verify, Delete                                                                                                                                                 |
| Smart routing         | List, Create, Update, Delete rules (location, device, time, A/B)                                                                                                               |
| Retargeting pixels    | List, Create, Update, Delete · Set Pixels on a Link · Remove All Pixels from a Link                                                                                            |
| Bio pages             | List, Get · Publish or Unpublish · List / Delete subscribers                                                                                                                   |
| Triggers              | Watch Link Clicks (instant) · Watch Events (instant) · Watch New Links · Watch Bio Page Subscribers                                                                            |
| Account and universal | Get My Account · Make an API Call                                                                                                                                              |

**Connecting:** paste an API key. The connection test calls
[`GET /api/v1/me`](https://developers.leonai.io/docs/api-reference/), which accepts any valid key, so you can connect
before deciding on scopes; the connection is labelled with your account email.

**Scopes:** `links:read` / `links:write` for links, folders, QR codes, routing, pixels
and bio pages; `analytics:read` / `analytics:write` for analytics and conversions;
`domains:read` / `domains:write` for custom domains; `webhooks:write` for the two
instant triggers.

**Watch Events** subscribes to the events you choose: `link.created`, `link.updated`,
`link.deleted`, `link.clicked`, `domain.verified`, `subscription.upgraded`,
`subscription.cancelled`. Instant triggers need the Pro plan or higher, and each active
scenario uses one of the plan's webhooks.

### Installing the app (maintainers)

The app ships in Make's Developer Platform export format v2 (`.imljson`). Build the
import ZIP and import it with the **Make Apps SDK** VS Code extension:

```bash
node packages/integrations/scripts/validate.js        # offline structural checks
python packages/integrations/scripts/package-make-app.py
# -> packages/integrations/make/dist/leonai-short-link.zip
```

Then **Make Apps SDK: Import app** → select the ZIP → create a connection with your key
and run a test scenario. The full module catalogue, endpoint map and import notes are in
`packages/integrations/make/README.md`.

## Browser extension

:::warning[Not published yet]
The LeonAI Links extension is not in the Chrome Web Store or on Firefox Add-ons yet, so you
can't install it. Until it is, create links in the [dashboard](https://links.leonai.io) or
call [`POST /api/v1/links`](https://developers.leonai.io/docs/api-reference/) directly. The features below are what the
extension will offer.
:::

A Manifest V3 extension (Chrome, Edge and Brave 121 or later, and Firefox) that shortens the
current tab's URL. The popup pre-fills the active tab's URL and an optional title and custom
back-half, shows the resulting short URL with Copy / View QR / Open, and lists your 5 most
recent links. A right-click context menu ("Shorten with LeonAI Links") is also included.

**Auth:** an API key with **`links:write`** (and `links:read` for the recent-links list).
The key stays on your device (`chrome.storage.local`, not synced to your other browsers)
and is sent only as `X-API-Key` to `https://api.short.leonai.io`. Link creation calls
`POST /api/v1/links`; the QR preview uses the public `GET /:shortCode/qr` (no key).
