Marketing
Bitly in your product and your AI agents, through one API
The Bitly toolkit covers the groups, Bitlinks and click metrics of a Bitly account: create and update links, and read clicks by time, country, referrer and device. Through Connect, your product or AI agent calls them with one endpoint, while Connect stores and renews the credentials and logs every execution.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/bitly_create_bitlink/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"long_url": "<long_url>"
}
}How it works
From a connected customer to the first Bitly call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their Bitly account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with Bitly.
Shorten links in your product
When your SaaS sends a campaign or a notification, create a Bitlink for each long URL in the customer's group and store the short link.
Click reports for clients
An agency tool pulls clicks per day, country and referrer for each Bitlink and shows them in a client report.
Redirect without new links
Update the long_url of an existing Bitlink to repoint a printed or shared short link, and let an AI agent check the clicks afterwards.
Tools
11 Bitly tools
- List groupsGETLists the groups the account belongs to. Each group has the guid that the other tools ask for as group_guid and, in bsds, the custom domains the group can shorten links with.
- List BitlinksGETLists the Bitlinks of a group, with their id, link, long_url, title and tags. The response has links and pagination: pass pagination.search_after as search_after, with the same filters, to read the next page.
- Get BitlinkGETReturns a Bitlink: the short link, long_url, title, tags, archived, created_at and the custom back-halves it had.
- Create BitlinkPOSTShortens a long URL into a new Bitlink and returns it, with the short link in link and its id in id. It counts toward the monthly link limit of the plan, and features the plan lacks, like a custom back-half, answer 402 UPGRADE_REQUIRED.
- Update BitlinkPATCHUpdates a Bitlink and returns it. Fields left out keep their value. Changing long_url redirects the link and always counts toward the monthly link limit of the plan; plans without redirects answer 402 UPGRADE_REQUIRED.
- Get Bitlink clicksGETReturns the clicks of a Bitlink per unit of time, in link_clicks with date and clicks. unit and units set the window: unit day with units 30 is the 30 days up to unit_reference.
- Get Bitlink clicks summaryGETReturns the total clicks of a Bitlink in a window, in total_clicks. unit and units set the window: unit day with units 30 is the 30 days up to unit_reference.
- Get Bitlink clicks by countryGETReturns the clicks of a Bitlink per country in a window, in metrics with value (the country code) and clicks. unit and units set the window: unit day with units 30 is the 30 days up to unit_reference.
- Get Bitlink clicks by referrerGETReturns the clicks of a Bitlink per referrer in a window, in metrics with value (the referrer) and clicks. unit and units set the window: unit day with units 30 is the 30 days up to unit_reference.
- Get Bitlink clicks by deviceGETReturns the clicks of a Bitlink per device type in a window. unit and units set the window: unit day with units 30 is the 30 days up to unit_reference. Plans without this report answer 402 UPGRADE_REQUIRED.
API key
Your customer pastes the app's key on a Connect screen, or your system sends the key with POST /api/customer-toolkits, with no screen.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/bitly, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
Questions about the Bitly toolkit
Do I need to build against the Bitly API?
No. Connect ships 11 Bitly tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their Bitly account?
With the mode the toolkit accepts: API key, OAuth with your product's app. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
