# Shorten.REST

Shorten.REST is a link shortening and management app that allows you to generate unique, branded URLs with advanced tracking capabilities.

- **Category:** url shortener
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 6
- **Triggers:** 0
- **Slug:** `SHORTEN_REST`
- **Version:** 20260316_00

## Tools

### Create Alias

**Slug:** `SHORTEN_REST_CREATE_ALIAS`

Tool to create a new alias (short URL) under a specified domain. Use when you need to shorten a URL. If no domain is specified, the alias will be attached to the default domain Short.fyi. You can override domain-level Meta Tags and Tracking Snippets by specifying them for each URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `metatags` | array | No | List of metatags for the alias. Use to override domain-level meta tags |
| `snippets` | array | No | List of tracking snippets for the alias. Use to override domain-level tracking snippets |
| `aliasName` | string | No | Alias name (without `/` at the beginning). If not specified, a random alias will be generated |
| `domainName` | string | No | Domain which alias will belong to (string without `http/https` or `/`). If not specified, defaults to 'short.fyi' |
| `destinations` | array | Yes | List of destination URLs with optional geo-targeting. At least one destination is required |

#### 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 Alias

**Slug:** `SHORTEN_REST_DELETE_ALIAS`

Tool to delete a single alias by providing alias and domain. Use when you need to remove an existing shortened URL. If no domain is provided, the API searches for the matching alias within the Short.fyi domain.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `aliasName` | string | Yes | Alias to delete (without `/` at the beginning). This is the short code identifier for the URL. |
| `domainName` | string | No | Domain which alias belongs to (string without `http/https` or `/`). If not provided, defaults to short.fyi. |

#### 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 Aliases

**Slug:** `SHORTEN_REST_GET_ALIASES`

Tool to retrieve all URL aliases of the authenticated user. Use when you need to list existing aliases (supports pagination).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of aliases to return per page (must be ≥ 1) |
| `cursor` | string | No | Cursor token for pagination to fetch the next set of aliases |

#### 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 data for aliases

**Slug:** `SHORTEN_REST_GET_CLICKS`

Tool to retrieve click data for shortened URLs. Use to check click analytics for your aliases. Returns a list of click records which may be empty if no clicks have occurred yet. Returned records may represent a limited window or subset of historical clicks rather than complete per-click logs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `alias` | string | No | The alias (short code) to retrieve click information for. If not provided, returns clicks for all aliases. |
| `limit` | integer | No | Maximum number of click records to return (must be >= 1) |
| `cursor` | string | No | Cursor token for pagination to fetch the next set of clicks |

#### 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 aliases by domain

**Slug:** `SHORTEN_REST_LIST_ALIASES_BY_DOMAIN`

Tool to retrieve all alias names associated with your account and a given domain. Results are in descending order by creation date. Use when you need to list alias names (not full details) for a specific domain with pagination support.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Number of results to return per request (must be >= 1). Defaults to 1000 if not specified. |
| `domain_name` | string | No | The domain name to get the aliases for (string without `http/https` or `/`). If not provided, defaults to 'short.fyi'. |
| `continue_from` | string | No | An ID returned by a previous query to continue aliases retrieval (see last_id in response). Used for pagination. |

#### 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 |

### Update Alias

**Slug:** `SHORTEN_REST_UPDATE_ALIAS`

Tool to update an existing short URL alias by providing its alias name and domain. Use when you need to modify destinations, metatags, or snippets for an existing alias. IMPORTANT: When updating array properties (like destinations), the entire array is replaced, so you must include all existing records you want to keep.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `metatags` | array | No | List of metatags to update. IMPORTANT: When updating array properties, the entire block is replaced, so include all old records you want to keep. |
| `snippets` | array | No | List of snippets to update. IMPORTANT: When updating array properties, the entire block is replaced, so include all old records you want to keep. |
| `aliasName` | string | Yes | The alias name to update (without leading slash, e.g., 'aBcDe012') |
| `domainName` | string | No | Domain which the alias belongs to (without http/https or trailing slash). Defaults to 'short.fyi'. |
| `destinations` | array | No | List of destination URLs to update. IMPORTANT: When updating array properties, the entire block is replaced, so include all old records you want to keep to avoid deleting them. |

#### 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 |
