> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to TinyURL

The TinyURL connector lets your AI agent act in each user's TinyURL account. Each user connects their own TinyURL access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 21 tools.

**Authentication:** Bearer Token
**Categories:** Marketing, Analytics
**Tools:** 21: 13 read, 7 write, 1 destructive
**Users sign in with:** Access token
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=TINYURL)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the TinyURL connection

   In **AgentKit > Connections**, create a TinyURL connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'tinyurl'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize TinyURL:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'tinyurl_analytics_general_get',
     toolInput: { from: '2025-01-01 00:00:00' },
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "tinyurl"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize TinyURL:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={"from":"2025-01-01 00:00:00"},
       tool_name="tinyurl_analytics_general_get",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their TinyURL credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'tinyurl_analytics_general_get',
  toolInput: {
    from: '<from>',
  },
  connector: 'tinyurl',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="tinyurl_analytics_general_get",
    tool_input={
        "from": "<from>",
    },
    connection_name="tinyurl",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `tinyurl_analytics_general_get`

Get Browser, OS and Device Stats · Read-only

Get browser, operating system and device breakdowns for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.
Returns data with click counts by browser, os and device.
Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `from` (`string`, required): Start of the report as a date-time. Example: 2025-01-01 00:00:00.
- `alias` (`string`, optional): Limit the report to one TinyURL alias. Example: myexamplelink.
- `tag` (`string`, optional): Limit the report to TinyURLs with this tag. Example: campaign-q1.
- `to` (`string`, optional): End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.

Example input: `{"from":"<from>"}`

### `tinyurl_analytics_hours_get`

Get Hour Popularity · Read-only

Get click counts by hour of the day for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.
Returns data with clicks per hour.
Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `from` (`string`, required): Start of the report as a date-time. Example: 2025-01-01 00:00:00.
- `alias` (`string`, optional): Limit the report to one TinyURL alias. Example: myexamplelink.
- `tag` (`string`, optional): Limit the report to TinyURLs with this tag. Example: campaign-q1.
- `to` (`string`, optional): End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.

Example input: `{"from":"<from>"}`

### `tinyurl_analytics_languages_get`

Get Top Languages · Read-only

Get the top visitor languages for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.
Returns data with languages and their click counts.
Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `from` (`string`, required): Start of the report as a date-time. Example: 2025-01-01 00:00:00.
- `alias` (`string`, optional): Limit the report to one TinyURL alias. Example: myexamplelink.
- `tag` (`string`, optional): Limit the report to TinyURLs with this tag. Example: campaign-q1.
- `to` (`string`, optional): End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.

Example input: `{"from":"<from>"}`

### `tinyurl_analytics_locations_get`

Get Click Locations · Read-only

Get click locations by country, or by area inside one country for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.
Returns data with locations and their click counts.
Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `from` (`string`, required): Start of the report as a date-time. Example: 2025-01-01 00:00:00.
- `region` (`string`, required): world for a breakdown by country, or a two-letter ISO 3166-1 country code for areas inside that country. Example: US. Default: `world`.
- `alias` (`string`, optional): Limit the report to one TinyURL alias. Example: myexamplelink.
- `tag` (`string`, optional): Limit the report to TinyURLs with this tag. Example: campaign-q1.
- `to` (`string`, optional): End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.

Example input: `{"from":"<from>","region":"world"}`

### `tinyurl_analytics_raw_list`

List Raw Click Logs · Read-only

Get raw click logs for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.
Returns data[] with one entry per click, including time, referrer, browser, operating system, device and location.
Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `from` (`string`, required): Start of the report as a date-time. Example: 2025-01-01 00:00:00.
- `alias` (`string`, optional): Limit the report to one TinyURL alias. Example: myexamplelink.
- `tag` (`string`, optional): Limit the report to TinyURLs with this tag. Example: campaign-q1.
- `to` (`string`, optional): End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.

Example input: `{"from":"<from>"}`

### `tinyurl_analytics_sources_get`

Get Top Sources · Read-only

Get the top referring sources for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.
Returns data with sources and their click counts.
Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `from` (`string`, required): Start of the report as a date-time. Example: 2025-01-01 00:00:00.
- `alias` (`string`, optional): Limit the report to one TinyURL alias. Example: myexamplelink.
- `tag` (`string`, optional): Limit the report to TinyURLs with this tag. Example: campaign-q1.
- `to` (`string`, optional): End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.

Example input: `{"from":"<from>"}`

### `tinyurl_analytics_timeline_get`

Get Click Timeline · Read-only

Get click counts over time for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.
Returns data with click counts per interval.
Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `from` (`string`, required): Start of the report as a date-time. Example: 2025-01-01 00:00:00.
- `alias` (`string`, optional): Limit the report to one TinyURL alias. Example: myexamplelink.
- `interval` (`string`, optional): Time bucket: minute, hour, day, week or month. Example: day. One of: `minute`, `hour`, `day`, `week`, `month`.
- `tag` (`string`, optional): Limit the report to TinyURLs with this tag. Example: campaign-q1.
- `to` (`string`, optional): End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.

Example input: `{"from":"<from>"}`

### `tinyurl_analytics_weekdays_get`

Get Weekday Popularity · Read-only

Get click counts by day of the week for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.
Returns data with clicks per weekday.
Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `from` (`string`, required): Start of the report as a date-time. Example: 2025-01-01 00:00:00.
- `alias` (`string`, optional): Limit the report to one TinyURL alias. Example: myexamplelink.
- `tag` (`string`, optional): Limit the report to TinyURLs with this tag. Example: campaign-q1.
- `to` (`string`, optional): End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.

Example input: `{"from":"<from>"}`

### `tinyurl_bulk_request_report_get`

Get Bulk Request Report · Read-only

Get the per-item results of a bulk request.
Returns data[] with each item's operation, domain, alias, url, tinyurl, status (success or failed), comment and metadata.
Use this after Get Bulk Request Status shows status 2 (processed).

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `bulk_request_id` (`integer`, required): ID of the bulk request, from Create Bulk Request. Example: 1234.

Example input: `{"bulk_request_id":1234}`

### `tinyurl_bulk_request_status_get`

Get Bulk Request Status · Read-only

Get the progress of a bulk request.
Returns data with id, status (0 new, 1 processing, 2 processed), total, success, failed, created_at and updated_at.
Use this after Create Bulk Request. Use Get Bulk Request Report once status is 2.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `bulk_request_id` (`integer`, required): ID of the bulk request, from Create Bulk Request. Example: 1234.

Example input: `{"bulk_request_id":1234}`

### `tinyurl_url_get`

Get TinyURL · Read-only

Get one TinyURL by domain and alias.
Returns data with tiny_url, url, domain, alias, tags, archived, deleted, analytics settings, created_at and expires_at.
Use this when you know the alias. Use List TinyURLs to find it.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `alias` (`string`, required): Alias of the TinyURL: the part after the domain. Example: myexamplelink for https://tinyurl.com/myexamplelink.
- `domain` (`string`, required): Domain of the TinyURL, for example tinyurl.com or one of your branded domains. Example: tinyurl.com.

Example input: `{"alias":"<alias>","domain":"<domain>"}`

### `tinyurl_urls_count`

Count TinyURLs · Read-only

Count the account's active or archived TinyURLs, optionally by creation date or an alias or tag search.
Returns data.count.
Use this for totals. Use List TinyURLs for the links themselves.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `type` (`string`, required): Which TinyURLs to list: available (active) or archived. Example: available. One of: `available`, `archived`.
- `from` (`string`, optional): Only TinyURLs created after this date-time. Example: 2025-01-01T00:00:00Z.
- `search` (`string`, optional): Filter by alias or tag, written as alias:<text> or tag:<text>. Example: tag:campaign-q1.
- `to` (`string`, optional): Only TinyURLs created before this date-time. Example: 2025-12-31T23:59:59Z.

Example input: `{"type":"available"}`

### `tinyurl_urls_list`

List TinyURLs · Read-only

List the account's active or archived TinyURLs, optionally by creation date or an alias or tag search.
Returns data[] with each TinyURL's domain, alias, tiny_url, tags, archived, analytics settings and created_at.
Use this to browse links. Use Count TinyURLs for just the number. Use Get TinyURL for one link.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `type` (`string`, required): Which TinyURLs to list: available (active) or archived. Example: available. One of: `available`, `archived`.
- `from` (`string`, optional): Only TinyURLs created after this date-time. Example: 2025-01-01T00:00:00Z.
- `search` (`string`, optional): Filter by alias or tag, written as alias:<text> or tag:<text>. Example: tag:campaign-q1.
- `to` (`string`, optional): Only TinyURLs created before this date-time. Example: 2025-12-31T23:59:59Z.

Example input: `{"type":"available"}`

### `tinyurl_bulk_request_create`

Create Bulk Request · Write

Queue a batch of TinyURL operations (create, update, change, delete, archive or unarchive), processed in the background.
Returns data with the bulk request id and status (0 new, 1 processing, 2 processed).
Use Get Bulk Request Status to poll, then Get Bulk Request Report for per-item results.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `items` (`array`, required): Operations to run. Each item has an operation (create, update, change, delete, archive or unarchive) plus that operation's fields: create takes url and optional domain, alias, tags, expires_at and description; update takes domain and alias plus new_ fields as in Update TinyURL; change takes domain, alias and url; delete, archive and unarchive take domain and alias. An optional metadata array is echoed back in the report. Example: [{"operation": "create", "url": "https://www.example.com/a", "alias": "bulk-a-2025"}, {"operation": "delete", "domain": "tinyurl.com", "alias": "old-link"}]
- `domain` (`string`, optional): Default domain for items that do not set one. Example: tinyurl.com.

Example input: `{"items":[{"operation":"create","url":"https://www.example.com/a","alias":"bulk-a-2025"},{"operation":"delete","domain":"tinyurl.com","alias":"old-link"}]}`

### `tinyurl_url_analytics_sharing_set`

Set Analytics Sharing · Write

Make one TinyURL's analytics page public or private.
Returns data with the TinyURL and its analytics settings.
Use Set Analytics Collection to turn collection on or off.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `alias` (`string`, required): Alias of the TinyURL: the part after the domain. Example: myexamplelink for https://tinyurl.com/myexamplelink.
- `domain` (`string`, required): Domain of the TinyURL, for example tinyurl.com or one of your branded domains. Example: tinyurl.com.
- `public` (`boolean`, required): true to share the analytics publicly, false to keep them private. Example: false.

Example input: `{"alias":"<alias>","domain":"<domain>","public":true}`

### `tinyurl_url_analytics_status_set`

Set Analytics Collection · Write

Turn click analytics collection on or off for one TinyURL.
Returns data with the TinyURL and its analytics settings.
Use Set Analytics Sharing to make the stats page public or private.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `alias` (`string`, required): Alias of the TinyURL: the part after the domain. Example: myexamplelink for https://tinyurl.com/myexamplelink.
- `domain` (`string`, required): Domain of the TinyURL, for example tinyurl.com or one of your branded domains. Example: tinyurl.com.
- `enabled` (`boolean`, required): true to collect click analytics, false to stop. Example: true.

Example input: `{"alias":"<alias>","domain":"<domain>","enabled":true}`

### `tinyurl_url_archive`

Archive or Unarchive TinyURL · Write

Archive an active TinyURL, or unarchive an archived one: the call switches its archived state.
Returns data with the TinyURL, including its new archived value.
Use Get TinyURL first to check archived. Archived links are listed with List TinyURLs type archived.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `alias` (`string`, required): Alias of the TinyURL: the part after the domain. Example: myexamplelink for https://tinyurl.com/myexamplelink.
- `domain` (`string`, required): Domain of the TinyURL, for example tinyurl.com or one of your branded domains. Example: tinyurl.com.

Example input: `{"alias":"<alias>","domain":"<domain>"}`

### `tinyurl_url_create`

Create TinyURL · Write

Shorten a long URL into a new TinyURL, optionally with a custom alias, branded domain, tags, description and expiry.
Returns data with tiny_url, domain, alias, url, tags, analytics settings, created_at and expires_at.
Use this to make one short link. Use Create Bulk Request for many at once.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `url` (`string`, required): The long URL to shorten. Example: https://www.example.com/blog/2025/launch-announcement.
- `alias` (`string`, optional): Custom alias, 5 to 30 characters on tinyurl.com (1+ on branded domains). Generated when omitted. Example: spring-launch.
- `description` (`string`, optional): Description of the TinyURL, 3 to 1000 characters. Example: Spring launch email link.
- `domain` (`string`, optional): Domain for the TinyURL: tinyurl.com (default, free) or one of your branded domains. Example: tinyurl.com.
- `expires_at` (`string`, optional): When the TinyURL expires, as an ISO 8601 date-time. Leave empty for no expiry. Example: 2025-10-25 10:11:12.
- `tags` (`array`, optional): Tags to group the TinyURL, up to 45 characters each. Example: ["campaign-q1", "email"].

Example input: `{"url":"<url>"}`

### `tinyurl_url_long_url_change`

Change Long URL · Write

Point an existing TinyURL at a new long URL, keeping its domain and alias.
Returns data with the updated TinyURL.
Use this to redirect a link. Use Update TinyURL to change alias, tags or expiry.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `alias` (`string`, required): Alias of the TinyURL: the part after the domain. Example: myexamplelink for https://tinyurl.com/myexamplelink.
- `domain` (`string`, required): Domain of the TinyURL, for example tinyurl.com or one of your branded domains. Example: tinyurl.com.
- `url` (`string`, required): New long URL the TinyURL should redirect to. Example: https://www.example.com/new-page.

Example input: `{"alias":"<alias>","domain":"<domain>","url":"<url>"}`

### `tinyurl_url_update`

Update TinyURL · Write

Change a TinyURL's domain, alias, tags, description, expiry or analytics collection. To change where it points, use Change Long URL.
Returns data with the updated TinyURL.
new_tags replaces all existing tags. Use Get TinyURL first to read the current values.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `alias` (`string`, required): Alias of the TinyURL: the part after the domain. Example: myexamplelink for https://tinyurl.com/myexamplelink.
- `domain` (`string`, required): Domain of the TinyURL, for example tinyurl.com or one of your branded domains. Example: tinyurl.com.
- `new_alias` (`string`, optional): New alias. Example: promotion2026.
- `new_description` (`string`, optional): New description. Example: Q2 promotion link.
- `new_domain` (`string`, optional): New domain to move the TinyURL to (tinyurl.com or a branded domain). Example: example.com.
- `new_expires_at` (`string`, optional): New expiry as an ISO 8601 date-time or duration. Example: 2026-01-31 00:00:00.
- `new_stats` (`boolean`, optional): Set true to turn click analytics on, false to turn them off. Example: true.
- `new_tags` (`array`, optional): Tags the TinyURL should have; replaces all existing tags. Example: ["campaign-q2"].

Example input: `{"alias":"<alias>","domain":"<domain>"}`

### `tinyurl_url_delete`

Delete TinyURL · Destructive

Delete a TinyURL so it stops redirecting.
Returns data with the deleted TinyURL.
Use Archive or Unarchive TinyURL to hide a link without deleting it.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `alias` (`string`, required): Alias of the TinyURL: the part after the domain. Example: myexamplelink for https://tinyurl.com/myexamplelink.
- `domain` (`string`, required): Domain of the TinyURL, for example tinyurl.com or one of your branded domains. Example: tinyurl.com.

Example input: `{"alias":"<alias>","domain":"<domain>"}`

## Related

Other Marketing connectors ([all 190](/agentkit/connectors/?category=marketing)):

- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Mailchimp](/agentkit/connectors/mailchimp/): Scalekit connector, OAuth, 73 tools
- [Twitter / X](/agentkit/connectors/twitteroauth/): Scalekit connector, OAuth, 92 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
