Using Linkly with ChatGPT

Connect ChatGPT to your Linkly account and manage short links through natural conversation.

What You Can Do

Once connected, you can ask ChatGPT to:

  • Create short links - "Create a short link for https://example.com"
  • Track performance - "How many clicks did my links get this week?"
  • Manage links - "Update the link called 'promo' with a new destination"
  • View analytics - "Show me clicks by country for the last 30 days"
Shorten links using Chatgpt Desktop
Shorten links using Chatgpt Desktop

There are two ways to connect Linkly to ChatGPT:

There are two ways to connect Linkly to ChatGPT:

  1. MCP Server (recommended) - Connect via the ChatGPT Desktop App using the Linkly MCP Server

  2. Custom GPT - Create a Custom GPT with Linkly API Actions

  • The ChatGPT Desktop App (macOS or Windows)
  • A Linkly account
  • An active paid ChatGPT plan (MCP is not available on the free plan)
  • Your Linkly API key
  • The Linkly MCP server installed locally (Node.js, Python, or standalone binary)

Quick Setup with MCP

  1. Use a Paid ChatGPT Plan

    Ensure you are on an active paid ChatGPT plan. The Model Context Protocol (MCP) is not available on the free plan.

  2. Enable Developer Mode

    Open ChatGPT (Web or Desktop) and go to
    Settings → Apps & Connectors → Advanced.

    Toggle Developer Mode to ON.

    Developer Mode is required for MCP Servers and custom tools to appear in the UI.

    ChatGPT Settings → Apps & Connectors → Advanced → Developer Mode toggle

  3. Create an MCP App (Web Only)

    In ChatGPT Web, go to Settings → Apps & Connectors and click Create an App.

    The Create an App option is currently available only in the web UI. Once the app is created, it will automatically sync to the ChatGPT desktop app.

  4. Add the Linkly MCP Server

    While creating the app in ChatGPT Web, fill in the app details as follows:

    ChatGPT Settings → Apps & Connectors → Advanced → Developer Mode toggle

    • Name: Linkly (or any name you prefer)
    • Icon: Optional
    • Endpoint:
        https://mcp.linklyhq.com?apiKey=<YOUR_API_KEY>&workspaceId=<YOUR_WORKSPACE_ID>
      
    • Authentication: Select No Auth

    Click Create to save the app.

    ⚠️ Treat this endpoint URL as sensitive, as it contains your API key.

  5. Restart ChatGPT

    Quit and relaunch the ChatGPT desktop app. ChatGPT will automatically detect the MCP server and load the Linkly tools. To verify, open a new chat and ask ChatGPT to perform a Linkly action.

Chatgpt Desktop integration
Chatgpt Desktop integration

For more details on MCP configuration options, available tools, and troubleshooting, see the Linkly MCP Server documentation.


Option 2: Custom GPT with Linkly Actions

  1. Go to ChatGPT Settings → Apps & Connectors 2. Locate the Linkly app 3. Click Delete App and confirm 4. Restart ChatGPT

The app will be removed immediately and will no longer be available in ChatGPT. ---

Note: Creating Custom GPTs requires a ChatGPT Plus, Team, or Enterprise subscription.

How to set up a Custom GPT with Linkly

  1. Get your API credentials from Linkly

    Log in to your Linkly dashboard, go to Settings → API Keys, and copy your API Key and Workspace ID.

  2. Create a Custom GPT in ChatGPT

    Go to ChatGPT, click your profile icon → My GPTsCreate a GPT. In the Configure tab, name your GPT (e.g., "Linkly Link Manager").

  3. Add GPT Description

    Create short links and URL shorteners. Use this when the user asks to shorten a URL, create a short link, or make a link shorter.

  4. Add GPT instructions

    In the Instructions field, add: "You are a helpful assistant that manages short links using Linkly. You can create new short links, list and search existing links, view click analytics, and update or delete links."

  5. Create a new Action

    Scroll to Actions and click Create new action. For Authentication, select API Key, set Auth Type to Custom, Custom Header Name to X-API-KEY, and paste your Linkly API key.

  6. Add the OpenAPI schema

    Paste the Linkly OpenAPI schema (provided below) into the Schema field. This defines all the available Linkly API endpoints.

  7. Configure your workspace ID

    Add this to the end of your GPT instructions: "When making API calls, always use workspace_id: YOUR_WORKSPACE_ID and include X-WORKSPACE-ID: YOUR_WORKSPACE_ID in headers." Replace YOUR_WORKSPACE_ID with your actual workspace ID.

  8. Test and save

    Click Test to verify the connection works, then click Save to publish your GPT.

OpenAPI Schema for Custom GPT

Copy and paste this schema into your Custom GPT's Action configuration:

openapi: 3.1.0
info:
  title: Linkly API
  description: API for managing short links, analytics, and domains
  version: 1.0.0

servers:
  - url: https://app.linklyhq.com

paths:
  /api/v1/workspace/{workspace_id}/links:
    post:
      operationId: createOrUpdateLink
      summary: Create a new short link or update an existing one
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                id:
                  type: integer
                  description: Link ID (include to update existing link)
                url:
                  type: string
                  description: The destination URL
                name:
                  type: string
                  description: Nickname for the link
                note:
                  type: string
                  description: Private note about this link
                domain:
                  type: string
                  description: Custom domain (without trailing /)
                slug:
                  type: string
                  description: Custom slug (must start with /)
                enabled:
                  type: boolean
                  description: Whether the link is active
                utm_source:
                  type: string
                utm_medium:
                  type: string
                utm_campaign:
                  type: string
                utm_term:
                  type: string
                utm_content:
                  type: string
      responses:
        '200':
          description: Link created or updated successfully

  /api/v1/workspace/{workspace_id}/links/{link_id}:
    delete:
      operationId: deleteLink
      summary: Delete a link
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
        - name: link_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Link deleted

  /api/v1/get_link/{link_id}:
    get:
      operationId: getLink
      summary: Get details of a specific link
      parameters:
        - name: link_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Link details

  /api/v1/workspace/{workspace_id}/links/export:
    get:
      operationId: listLinks
      summary: List all links in the workspace
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
        - name: search
          in: query
          schema:
            type: string
          description: Search query to filter links
      responses:
        '200':
          description: List of links

  /api/v1/workspace/{workspace_id}/clicks/export:
    get:
      operationId: getClicks
      summary: Get recent click data
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
        - name: link_id
          in: query
          schema:
            type: integer
          description: Filter by link ID
      responses:
        '200':
          description: Recent clicks

  /api/v1/workspace/{workspace_id}/clicks:
    get:
      operationId: getAnalytics
      summary: Get time-series click analytics
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
        - name: start
          in: query
          schema:
            type: string
          description: Start date (YYYY-MM-DD)
        - name: end
          in: query
          schema:
            type: string
          description: End date (YYYY-MM-DD)
        - name: link_id
          in: query
          schema:
            type: integer
          description: Filter by link ID
      responses:
        '200':
          description: Analytics data

  /api/v1/workspace/{workspace_id}/clicks/counters/{counter}:
    get:
      operationId: getAnalyticsBy
      summary: Get click counts grouped by dimension
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
        - name: counter
          in: path
          required: true
          schema:
            type: string
            enum: [country, platform, browser_name, referer, isp, link_id]
          description: Dimension to group by
      responses:
        '200':
          description: Grouped analytics

  /api/v1/workspace/{workspace_id}/domains:
    get:
      operationId: listDomains
      summary: List custom domains
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of domains

Example Conversations

You: Create a short link for https://example.com/summer-sale with UTM source "twitter"

ChatGPT: I've created your short link: https://linkly.link/abc123 pointing to https://example.com/summer-sale?utm_source=twitter

Checking Analytics

You: How many clicks did I get this week by country?

ChatGPT: Here's your click breakdown for the last 7 days: United States: 1,234 clicks, United Kingdom: 567 clicks, Germany: 234 clicks...

Privacy & Security

  • Your API credentials are stored securely in your Custom GPT configuration
  • Only you (and anyone you share the GPT with) can access your Linkly account
  • You can revoke API keys anytime from the Linkly dashboard

ChatGPT Integration FAQs

Which method should I use - MCP or Custom GPT?

MCP is recommended if you have the ChatGPT Desktop App - it's easier to set up and provides more features. Use Custom GPT if you prefer the web interface or want to share the GPT with others.

How do I fix "Authentication failed" or "Unauthorized" errors?

Double-check your API key in the Linkly dashboard at Settings → API Keys. Make sure the API key is entered correctly. Verify there are no extra spaces in your credentials.

Do I need a ChatGPT Plus subscription?

For Custom GPTs with Actions, yes. For MCP, you need the ChatGPT Desktop App which also requires a Plus subscription.

Can I share my Linkly GPT with others?

You can share Custom GPTs, but be careful - anyone with access will be able to use your Linkly API key to manage links in your workspace. Consider creating a separate workspace or API key for shared GPTs.

Can I use this with the ChatGPT web version?

Yes, both Custom GPTs and MCP (Model Context Protocol) can work with the ChatGPT web version.

Track 1000 monthly clicks with all features included.

No credit card required