# Linkly — Pipedream Connect

> Easily create tracking links, add retargeting tags, do smart redirects and more.

- API slug: `linkly` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Web & App Development
- Website: https://linklyhq.com
- This page (HTML): https://pipedream.com/apps/linkly
- Tools: 8 actions · 2 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: linkly`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "linkly",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Link:
const result = await mcp.callTool({
  name: "linkly-create-link",
  arguments: {
    url: "URL",
    name: "Name",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Linkly endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "linkly-create-link",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    linkly: { authProvisionId: "apn_xxxxxxx" },
    url: "URL",
    name: "Name",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (8)

### `linkly-create-link` — Create Link (Write)

Create a new short link via POST /api/v1/link. See the documentation.

Full schema: https://pipedream.com/apps/linkly/actions/create-link.md

### `linkly-delete-link` — Delete Link (Write)

Permanently delete a short link via DELETE /api/v1/workspace/{workspace_id}/links/{id}. The short URL will return 404 for new visitors. See the documentation.

Full schema: https://pipedream.com/apps/linkly/actions/delete-link.md

### `linkly-get-link` — Get Link (Read-only)

Fetch a single short link via GET /api/v1/link/{id}, with full metadata including click counts, custom domain, and redirect rules. See the documentation.

Full schema: https://pipedream.com/apps/linkly/actions/get-link.md

### `linkly-list-domains` — List Domains (Read-only)

List all custom domains in your workspace via GET /api/v1/workspace/{workspace_id}/domains. See the documentation.

Full schema: https://pipedream.com/apps/linkly/actions/list-domains.md

### `linkly-list-link-id-options` — List Link ID Options (Read-only)

Retrieves available options for the Link ID field.

Full schema: https://pipedream.com/apps/linkly/actions/list-link-id-options.md

### `linkly-list-links` — List Links (Read-only)

List all short links in your workspace via GET /api/v1/workspace/{workspace_id}/list_links, with click counts and metadata. See the documentation.

Full schema: https://pipedream.com/apps/linkly/actions/list-links.md

### `linkly-list-workspaces` — List Workspaces (Read-only)

List all workspaces the API key has access to via GET /api/v1/workspaces. Useful for finding the workspace ID required for API requests. See the documentation.

Full schema: https://pipedream.com/apps/linkly/actions/list-workspaces.md

### `linkly-update-link` — Update Link (Write)

Update an existing short link via POST /api/v1/link (with id) — change its destination URL, slug, name, or custom domain without breaking the existing short URL. See the documentation.

Full schema: https://pipedream.com/apps/linkly/actions/update-link.md

## Triggers (2)

### `linkly-new-link-clicked` — New Link Clicked (Instant) (Instant)

Emit new event each time any link in the workspace is clicked, with full click metadata (location, device, browser, referrer). Subscribes to a workspace webhook via POST /api/v1/workspace/{workspace_id}/webhooks for real-time delivery. Note: webhooks require a paid Linkly plan. See the…

Full schema: https://pipedream.com/apps/linkly/triggers/new-link-clicked.md

### `linkly-new-link-created` — New Link Created (Polling)

Emit new event when a new link is created in the workspace. Polls GET /api/v1/workspace/{workspace_id}/list_links sorted by inserted_at and emits anything newer than the last seen link ID. Useful for syncing newly-created short links to a CRM, spreadsheet, or analytics destination. See the…

Full schema: https://pipedream.com/apps/linkly/triggers/new-link-created.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
