Skip to content

Connectors / Marketing · HTTP Connector

Automate Bitly with Tray.ai

Update a Bitlink, create a campaign and create a channel in Bitly. Connect Bitly to the rest of your marketing stack with Tray.ai.

What can you do with Bitly on Tray.ai?

Bitly is a link management platform for creating short branded links and QR codes, then tracking clicks by country, device and referrer. Tray.ai connects to Bitly through the HTTP Connector, so your workflows can call the Bitly API alongside the rest of your stack.

  • Shorten a link for each new blog post in your content system before it goes to social.
  • Get clicks for a Bitlink each week and add the numbers to your marketing dashboard.
  • Create a campaign for each launch in your marketing calendar so links are grouped for reporting.
Connects through
HTTP Connector
Authentication
A bearer token
Base URL
https://api-ssl.bitly.com/v4

Set it up

Connect Bitly to Tray.ai

Each step uses Bitly's own API details, from its documentation.

Step 1

Save Bitly's API token

Save the token Bitly issues as a Tray.ai authentication. The HTTP Client sends it as a bearer token on every call. The token stays out of the workflow and out of the logs.

Step 2

Point the HTTP Client at the API

Add an HTTP Client step and use https://api-ssl.bitly.com/v4 as the base URL. Or paste a cURL example from Bitly's API docs, and Tray.ai fills in the method, URL, and headers.

Step 3

Start with “Get a Bitlink”

It's one of 16 documented actions, under Bitlinks. The response comes back as data the next step can map into your other apps.

Step 4

Hand it to an AI agent

Wrap “Shorten a link” and “Update a Bitlink” in workflows, and Tray.ai's Agent Gateway for MCP publishes them as governed tools Claude and other AI agents can call.

Workflows to build with Bitly

Each one uses actions and events from Bitly's own API documentation.

Copy Bitly click counts to Google Sheets weekly

When

On a schedule

Then

  1. Get clicks for a Bitlink in Bitly for each tracked link
  2. Update the click counts in the campaign sheet in Google Sheets

With Google Sheets

Create Bitly campaigns for new Salesforce campaigns

When

A campaign is created in Salesforce

Then

  1. Create a campaign in Bitly with the same name
  2. Shorten a link in Bitly for the campaign landing page
  3. Save the short link on the campaign in Salesforce

With Salesforce

Apps you can build on Bitly data

Internal tools your team can build with an AI assistant, each one using Bitly calls from its API documentation.

Campaign link performance report

Shows links in each campaign with clicks by country and referrer so a marketer can see what drives traffic.

Link request portal

Lets staff request a short branded link, adds it to a campaign channel, and shows its click count.

Give your AI agents Bitly tools

Build an MCP server on Bitly in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works

  • Shorten a link
  • Get clicks for a Bitlink
  • List campaigns
  • List channels
  • List custom domains
  • Get a Bitlink
  • Update a Bitlink
  • Delete a Bitlink

What the Bitly API covers

5 resources and 16 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.

Bitlinks

  • Shorten a link
  • Get a Bitlink
  • Update a Bitlink
  • Delete a Bitlink
  • Expand a Bitlink

Link metrics

  • Get clicks for a Bitlink
  • Get clicks by country
  • Get clicks by referrer

Campaigns

  • List campaigns
  • Create a campaign
  • Update a campaign

Channels

  • List channels
  • Create a channel
  • Add Bitlinks to a channel

Custom domains

  • List custom domains
  • Add a custom domain

Checked against Bitly's own documentation on 2026-10-22

dev.bitly.com/api-reference

Frequently asked questions

What can a Tray.ai workflow do in Bitly?

+

The Bitly API documents 16 actions across 5 resources (Bitlinks, Link metrics, Campaigns, Channels, Custom domains). For example: Shorten a link; Get clicks for a Bitlink; List campaigns. A workflow can make any documented call through the HTTP Connector.

How does Tray.ai authenticate with Bitly?

+

The Bitly API uses a bearer token. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.

See Bitly working against your stack.

We'll walk through a tailored demo with your systems plugged in.

Great — a couple more details

This helps us connect you with the right person. Optional, and you can skip it.