quecto

Shorten a URL

Create a shortened with a specific link

POST
/shorten
/shorten

Request Body

application/jsonRequired

Shorten a link

link
Required
string

The link to shorten

Format: "link"

expiration
Required
integer

The expiration time in minutes of the shortened link

Format: "int64"

passwordstring

The password needed to have access to the shortened link

custom_scstring

The custom short code for the shortened link

curl -X POST "https://s.oriondev.fr/api/shorten" \
  -H "Content-Type: application/json" \
  -d '{
    "link": "https://google.com",
    "expiration": 0,
    "password": "password",
    "custom_sc": "google"
  }'

Link has been successfully shortened

{
  "status": 200,
  "message": "Link has been successfully shortened.",
  "data": {
    "short_code": "19449fa041f6480",
    "link": "https://google.com",
    "expiration": 0,
    "delete_token": "6efa07a53cb50369df12de7e1ad57d1d82dd3ac0bca734567900feb23691ac30"
  }
}