Skip to main content
PATCH
/
links
/
{alias}
Update link details
curl --request PATCH \
  --url https://ishortn.ink/api/v1/links/{alias} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "url": "https://new-destination.com",
  "expiresAfter": null
}'
{
  "shortLink": "https://ishortn.ink/newAlias",
  "url": "https://new-destination.com",
  "alias": "newAlias",
  "expiresAt": "2024-12-31T23:59:59Z",
  "expiresAfter": null
}

Authorizations

x-api-key
string
header
required

Path Parameters

alias
string
required

The alias of the shortened link.

Query Parameters

domain
string

The domain of the shortened link. If not provided, the default domain will be used.

Body

application/json
url
string<url>

The new destination URL.

alias
string

The new custom alias for the shortened link.

expiresAt
string<date-time> | null

The new date and time when the link expires. Use null to remove expiration date.

expiresAfter
integer | null

The new number of clicks after which the link expires. Use null to remove click limit.

Response

Link updated successfully

The shortened link.

url
string

The original URL.

alias
string

The alias of the shortened link.

expiresAt
string<date-time> | null

The expiration date and time of the link.

expiresAfter
integer | null

The number of clicks after which the link expires.

isProtected
boolean

Indicates if the link is password protected (relevant for creation response).