Trimfo API v1

Automate your shortlinks.

The Trimfo API allows you to automatically create shortlinks using your own software, Discord bots, or custom scripts without logging into the dashboard.

Need an API Token?

Our API documentation is public for everyone to learn, but you need a registered account to actually generate links and earn money.

Create Free Account

1The Endpoint

To create a new shortlink, you need to send a POST request to our link creation endpoint:

POSThttps://trimfo.com/api/links

2Required Parameters

When sending your request, you must include the following information in JSON format:

destination_urlRequired

The long URL that you want to shorten. (e.g. https://google.com)

custom_aliasOptional

A custom name for your link. If left blank, we will generate a random one.

3Success Response

If successful, we will return the newly created shortlink instantly:

{
  "link": {
    "short_url": "https://trf.lat/abc12"
  }
}
curl -X POST https://trimfo.com/api/links \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
  "destination_url": "https://your-long-link.com"
}'

Remember: You must replace YOUR_API_TOKEN with your actual access token from the dashboard for the code to work.