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

# TinyURL Integration for AI Agents & Workflows

> Professional URL shortening service with custom aliases, analytics, and link management features

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img className="block dark:hidden" src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/tinyurl-light.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=3bd4cdace975ecbb288667ad9bc73035" alt="TinyURL logo" width="72" height="72" data-path="logos/tinyurl-light.svg" />

<img className="hidden dark:block" src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/tinyurl-dark.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=3f0d57fb49c773b8e5d70deec863ea03" alt="TinyURL logo" width="72" height="72" data-path="logos/tinyurl-dark.svg" />

## Overview

Add **TinyURL** to any ModuleX agent or workflow. URL shortening, analytics retrieval, and link-metadata updates against the TinyURL REST API (`api.tinyurl.com`).

<Info>
  **Categories**: Marketing & Advertising · Utilities · Link · Miscellaneous · **Auth**: API Token · **Actions**: 3
</Info>

## Authentication

### API Token Authentication

Authenticate using your TinyURL API token

<Steps>
  <Step title="Step 1">
    Log in to your TinyURL account at [https://tinyurl.com](https://tinyurl.com)
  </Step>

  <Step title="Step 2">
    Navigate to Settings or API section
  </Step>

  <Step title="Step 3">
    Generate or copy your API token
  </Step>

  <Step title="Step 4">
    Use the token to authenticate API requests
  </Step>
</Steps>

#### Required Credentials

| Field             | Description                               | Required | Format                             |
| ----------------- | ----------------------------------------- | -------- | ---------------------------------- |
| TinyURL API Token | Your TinyURL API token for authentication | Yes      | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |

## Available Actions

<AccordionGroup>
  <Accordion title="create_shortened_link — Create a new shortened URL with optional custom alias, tags, and expiration settings">
    ### Parameters

    <ResponseField name="url" type="string" required>
      The long URL that will be shortened
    </ResponseField>

    <ResponseField name="domain" type="string">
      Domain for the TinyURL (default: tinyurl.com, or use branded domains with subscription) (Default: `tinyurl.com`)
    </ResponseField>

    <ResponseField name="alias" type="string">
      Custom alias (auto-generated if not provided)
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tags to group and categorize TinyURLs (paid only)
    </ResponseField>

    <ResponseField name="expires_at" type="string">
      Expiration ISO8601 datetime. Paid only
    </ResponseField>

    <ResponseField name="description" type="string">
      Description for the alias
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "tiny_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tiny Url"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Url"
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Domain"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Alias"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created At"
        }
      },
      "required": [
        "success"
      ],
      "title": "CreateShortenedLinkOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="retrieve_link_analytics — Get analytics for a TinyURL including total clicks, geographic breakdowns, and device types. Requires paid account">
    ### Parameters

    <ResponseField name="domain" type="string">
      Domain of the TinyURL (Default: `tinyurl.com`)
    </ResponseField>

    <ResponseField name="alias" type="string" required>
      Alias of the TinyURL to get analytics for
    </ResponseField>

    <ResponseField name="from_date" type="string" required>
      Start datetime for analytics report (ISO8601)
    </ResponseField>

    <ResponseField name="to_date" type="string">
      End datetime; defaults to now
    </ResponseField>

    <ResponseField name="tag" type="string">
      Tag to filter analytics by
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "total_clicks": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Total Clicks"
        },
        "date_range": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Date Range"
        },
        "clicks_by_country": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Clicks By Country",
          "type": "array"
        },
        "clicks_by_device": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Clicks By Device",
          "type": "array"
        },
        "clicks_by_referrer": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Clicks By Referrer",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "RetrieveLinkAnalyticsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_link_metadata — Update the metadata of an existing TinyURL including domain, alias, analytics settings, and expiration">
    ### Parameters

    <ResponseField name="domain" type="string" required>
      Current domain of the TinyURL
    </ResponseField>

    <ResponseField name="alias" type="string" required>
      Current alias of the TinyURL
    </ResponseField>

    <ResponseField name="new_domain" type="string">
      New domain to switch to
    </ResponseField>

    <ResponseField name="new_alias" type="string">
      New alias to switch to
    </ResponseField>

    <ResponseField name="new_stats" type="boolean">
      Enable or disable click analytics collection
    </ResponseField>

    <ResponseField name="new_tags" type="array">
      New tags (overwrites existing). Paid only
    </ResponseField>

    <ResponseField name="new_expires_at" type="string">
      New expiration ISO8601 datetime. Paid only
    </ResponseField>

    <ResponseField name="new_description" type="string">
      New description for the alias
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "tiny_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tiny Url"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Url"
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Domain"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Alias"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Updated At"
        },
        "analytics_enabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Analytics Enabled"
        }
      },
      "required": [
        "success"
      ],
      "title": "UpdateLinkMetadataOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* Free tier: shortening only; analytics + tags + expiration require
  a paid plan. Non-2xx responses are surfaced as `success=False` +
  parsed `error`.

## Related integrations

<CardGroup cols={3}>
  <Card title="Short.io" href="/integrations/tools/short-io" />

  <Card title="Ahrefs" href="/integrations/tools/ahrefs" />

  <Card title="ConvertAPI" href="/integrations/tools/convertapi" />
</CardGroup>

## Links

* [TinyURL](https://tinyurl.com)
