# Linkly

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

- **Category:** url shortener
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 17
- **Triggers:** 0
- **Slug:** `LINKLY`
- **Version:** 00000000_00

## Tools

### Create or Update Link

**Slug:** `LINKLY_CREATE_OR_UPDATE_LINK`

Tool to create a new shortened link or update an existing one in Linkly. Use when you need to generate a trackable short URL with custom parameters, UTM tracking, retargeting pixels, or Open Graph metadata. To create a new link, provide url and workspace_id. To update an existing link, provide id and the fields you want to change.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | No | Link ID. Required to update an existing link, omit when creating new |
| `url` | string | No | Destination URL. Required when creating a new link, optional when updating |
| `name` | string | No | Nickname/label for the link for easy identification |
| `slug` | string | No | Custom slug for the shortened URL (must start with /). If not provided, a random slug is generated |
| `rules` | array | No | Array of conditional redirect rules for advanced routing (device-based, geo-based, A/B testing, etc.) |
| `domain` | string | No | Custom domain for the shortened link (without trailing /). Must be configured in your workspace |
| `gtm_id` | string | No | Google Tag Manager container ID (format: GTM-XXXXXXX) |
| `enabled` | boolean | No | Whether the link is active and will redirect. Set to false to disable the link temporarily |
| `cloaking` | boolean | No | Enable link cloaking to mask the destination URL in browser |
| `og_image` | string | No | Open Graph image URL displayed when the link is shared on social media |
| `og_title` | string | No | Open Graph title displayed when the link is shared on social media |
| `utm_term` | string | No | UTM term parameter for paid search keywords |
| `block_bots` | boolean | No | Block known bot traffic from accessing the link |
| `ga4_tag_id` | string | No | Google Analytics 4 measurement ID for tracking (format: G-XXXXXXXXXX) |
| `utm_medium` | string | No | UTM medium parameter for campaign tracking (e.g., email, social, cpc) |
| `utm_source` | string | No | UTM source parameter for campaign tracking (e.g., newsletter, twitter) |
| `fb_pixel_id` | string | No | Facebook Pixel ID for retargeting and conversion tracking |
| `utm_content` | string | No | UTM content parameter for A/B testing and content-targeted ads |
| `utm_campaign` | string | No | UTM campaign parameter for tracking campaign name |
| `workspace_id` | integer | No | Workspace ID. Required when creating a new link, optional when updating |
| `hide_referrer` | boolean | No | Hide HTTP referrer information from the destination website |
| `forward_params` | boolean | No | Forward query parameters from the short link to the destination URL |
| `og_description` | string | No | Open Graph description displayed when the link is shared on social media |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Link

**Slug:** `LINKLY_DELETE_LINK`

Tool to delete a specific link by ID from a workspace. Use when you need to permanently remove a link. This action is permanent and cannot be undone.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | The id of the Link to delete |
| `workspace_id` | string | Yes | The id of the Workspace |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Links

**Slug:** `LINKLY_DELETE_LINKS`

Tool to delete one or more links by their IDs. This action is permanent and cannot be undone. Use when you need to remove links from a workspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ids` | array | Yes | List of link IDs to delete. This operation is permanent and cannot be undone. |
| `workspace_id` | string | Yes | The ID of the workspace containing the links to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Export Links

**Slug:** `LINKLY_EXPORT_LINKS`

Tool to export all links in a workspace as JSON or CSV. Use when you need to retrieve all links for backup, analysis, or migration purposes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `format` | string ("json" | "csv") | No | Export format - either json or csv |
| `search` | string | No | Search query to filter links |
| `workspace_id` | string | Yes | The id of the Workspace |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Click Counters by Dimension

**Slug:** `LINKLY_GET_CLICK_COUNTERS`

Tool to retrieve click analytics grouped by a specific dimension (counter). Returns aggregated counts for each unique value of the selected dimension. Use when you need to analyze click patterns by country, platform, browser, referrer, ISP, link, or URL parameters.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | string | No | The end date for the date range in YYYY-MM-DD format |
| `bots` | boolean | No | Set to false to exclude bot clicks from the results. Default includes bots. |
| `start` | string | No | The start date for the date range in YYYY-MM-DD format |
| `format` | string ("json" | "csv" | "tsv") | No | Format of the response data. |
| `unique` | boolean | No | Set to true to only count unique clicks (one per IP/user). Default counts all clicks. |
| `counter` | string ("country" | "platform" | "browser" | "referer" | "isp" | "link_id" | "top_params") | Yes | The dimension to group clicks by. Options: country, platform, browser, referer, isp, link_id, or top_params |
| `country` | string | No | Filter by country using ISO 3166-1 alpha-2 country code (e.g., US, GB, DE) |
| `link_id` | string | No | The ID of a single Link to filter by |
| `link_ids` | string | No | Comma-separated list of Link IDs to filter by |
| `workspace_id` | string | Yes | The ID of the Workspace |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Click Analytics

**Slug:** `LINKLY_GET_CLICKS`

Tool to retrieve click analytics for a workspace. Filter by link, date range, country, and more. Returns time-series data suitable for charting.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | string | No | End date for the date range filter. Accepts formats: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ. |
| `isp` | string | No | Filter clicks by Internet Service Provider name. |
| `bots` | boolean | No | Set to false to exclude bot clicks from the results. Default behavior includes bots. |
| `pivot` | string ("link_id") | No | Pivot option for the response data. |
| `start` | string | No | Start date for the date range filter. Accepts formats: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ. |
| `format` | string ("json" | "csv" | "tsv") | No | Format for the API response. |
| `unique` | boolean | No | Set to true to only include unique clicks in the results. Default is false. |
| `browser` | string | No | Filter clicks by browser name (e.g., 'Chrome', 'Firefox', 'Safari'). |
| `country` | string | No | Filter clicks by country using ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'CA'). |
| `link_id` | string | No | Filter clicks by a single link ID. |
| `referer` | string | No | Filter clicks by referrer domain. |
| `link_ids` | string | No | Filter clicks by multiple links. Provide a comma-separated list of link IDs (e.g., '24,25,26'). |
| `platform` | string | No | Filter clicks by platform/operating system (e.g., 'Windows', 'Mac', 'iOS', 'Android'). |
| `timezone` | string | No | The timezone to use for date/time calculations (e.g., 'America/New_York', 'Europe/London'). |
| `frequency` | string ("day" | "hour") | No | Frequency of data points in the response. |
| `workspace_id` | string | Yes | The ID of the workspace to retrieve click analytics for. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Link Details

**Slug:** `LINKLY_GET_LINK`

Tool to retrieve detailed information about a specific link by its ID. Use when you need to fetch link configuration, UTM parameters, or click statistics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The id of the Link |
| `workspace_id` | string | No | Workspace ID. Optional when using OAuth2 Bearer token. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Link By ID

**Slug:** `LINKLY_GET_LINK_BY_ID`

Tool to retrieve details for a specific link by ID. Use when you need to fetch information about a shortened link, including its destination URL, click statistics, and configuration settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | The unique identifier of the link to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Domains

**Slug:** `LINKLY_LIST_DOMAINS`

Tool to retrieve all custom domains configured for a workspace. Use when you need to see available domains for creating short links.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `workspace_id` | string | Yes | The ID of the workspace to retrieve domains for. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Links

**Slug:** `LINKLY_LIST_LINKS`

Tool to get a paginated list of all links in a workspace. Supports search, sorting, and pagination. Returns link details including click statistics. Use when you need to retrieve or search through links.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (default: 1) |
| `search` | string | No | The search query to filter links by name or URL |
| `sort_by` | string | No | Field to sort by (e.g., name, clicks_total, created_at) |
| `sort_dir` | string | No | Sort direction: asc (ascending) or desc (descending) |
| `page_size` | integer | No | Number of links to return per page (default: 1000) |
| `workspace_id` | string | Yes | The id of the Workspace |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Link Webhooks

**Slug:** `LINKLY_LIST_LINK_WEBHOOKS`

Tool to retrieve all webhook subscriptions for a specific link. Use when you need to see what webhooks are configured for a link.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `link_id` | integer | Yes | The ID of the link to retrieve webhook subscriptions for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Workspaces

**Slug:** `LINKLY_LIST_WORKSPACES`

Tool to retrieve all workspaces the authenticated user has access to. Use this to discover available workspace IDs for other API calls.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List workspace webhooks

**Slug:** `LINKLY_LIST_WORKSPACE_WEBHOOKS`

Tool to list all webhook subscriptions for a specific workspace. Use when you need to retrieve or view the configured webhooks for a workspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `workspace_id` | integer | Yes | The ID of the workspace to list webhooks for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Subscribe webhook to link

**Slug:** `LINKLY_SUBSCRIBE_WEBHOOK_TO_LINK`

Tool to subscribe a webhook URL to receive notifications when a specific link is clicked. Use when you need to track click events for a shortened link.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The webhook URL that will receive POST requests when the link is clicked. The webhook will receive click data including country, platform, browser, and more. |
| `link_id` | integer | Yes | The ID of the link to subscribe the webhook to. This is the unique identifier for the shortened link. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Subscribe Webhook to Workspace

**Slug:** `LINKLY_SUBSCRIBE_WEBHOOK_TO_WORKSPACE`

Tool to subscribe a webhook URL to receive click notifications from a Linkly workspace. Use when you need to set up real-time notifications for link clicks. The webhook will receive POST requests containing click data including country, platform, browser, and other analytics information whenever any link in the workspace is clicked.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The webhook URL that will receive POST requests with click data. Must be a valid HTTP/HTTPS URL that can accept POST requests with JSON payloads containing click information (country, platform, browser, etc.). |
| `workspace_id` | integer | Yes | The ID of the workspace to subscribe the webhook to. This workspace will send click notifications to the specified webhook URL. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Unsubscribe Webhook from Link

**Slug:** `LINKLY_UNSUBSCRIBE_WEBHOOK_FROM_LINK`

Tool to remove a webhook subscription from a link. Use when you need to stop receiving webhook events for a specific link.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `hook_id` | string | Yes | The webhook URL (will be URL-encoded automatically if not already encoded). This is the URL that was subscribed to receive webhook events. |
| `link_id` | integer | Yes | The ID of the link to remove the webhook subscription from. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Unsubscribe Webhook From Workspace

**Slug:** `LINKLY_UNSUBSCRIBE_WEBHOOK_FROM_WORKSPACE`

Tool to remove a webhook subscription from a workspace. Use when you need to unsubscribe a webhook URL from receiving events for a specific workspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `hook_id` | string | Yes | The webhook URL (must be URL-encoded). This is the encoded version of the webhook URL you want to unsubscribe. |
| `workspace_id` | integer | Yes | The ID of the workspace from which to unsubscribe the webhook. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
