This API DOES NOT require authorization, which means using an anonymous account.
Example #1: Shorten google.com
You can shortgoogle.com by request API URL: https://api.u301.com/v2/shorten?url=https://google.com,
even if visit the URL directly in the browser.
Example #2: Specify Domain
We assume you have already added your own domaingo.example.com, you can shorten your link by request API:
https://api.u301.com/v2/shorten?domain=go.example.com&url=https://google.com
Which specifies the domain in the query string, and that will override the default domain.
Example #3: Custom Alias
We’d like to create a shortened linku301.co/dashboard which point to u301 dashboard.Request with a parameter
slug:https://api.u301.com/v2/shorten?url=https://u301.com/dashboard/&slug=dashboard
the returned result is
shortened is https://u301.co/dashboard 🎉Query Parameters
The long URL to shorten. the URL MUST starts with a valid schema, such as http:// or https://
The title of the link
Domain that you want to use for the short link.
Custom alias for the short link, must be unique, only accept letter, number, underscore _ and hyphen -.
Response
Shortened url