Skip to content

API reference

Update a link

Change a short link's destination, alias, expiry or activation time.

PATCHhttps://ishortn.ink/api/v1/links/{alias}

Updates one short link in your personal workspace. Send only the fields you want to change. The change takes effect for visitors straight away.

Request

ParameterInTypeRequiredDescription
aliaspathstringYesThe link's current alias.
domainquerystringNoThe link's domain. Defaults to your default domain, or isht.app. See Domains.

The JSON body takes at least one of these fields:

FieldTypeDescription
urlstringNew destination. Must be a valid absolute URL. It goes through the link safety check again.
aliasstringNew alias, 1 to 20 characters: letters, numbers, - and _. The old alias stops working.
expiresAtstring | nullExpiry date as ISO 8601 with a time zone, such as 2026-12-31T23:59:59Z. null removes it.
activatesAtstring | nullActivation time as ISO 8601 with a time zone. Setting a time requires Pro or Ultra; null removes it on any plan.
expiresAfterinteger | nullClick limit, a whole number above 0. null removes it.

Any other field, such as password or domain, is rejected with 400. To change those, edit the link in the dashboard.

curl "https://ishortn.ink/api/v1/links/launch-day?domain=isht.app" \
  -X PATCH \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/blog/launch-day-recap",
    "expiresAt": null
  }'

Response

200 OK with the updated link, in the same shape as Get a link.

{
  "shortLink": "https://isht.app/launch-day",
  "url": "https://example.com/blog/launch-day-recap",
  "alias": "launch-day",
  "expiresAt": null,
  "activatesAt": null,
  "expiresAfter": null
}

Errors

StatusBodyCause
400Invalid request bodyThe body isn't valid JSON.
400JSON list of validation issuesA field has the wrong type or format, or the body has a field that isn't listed above.
400No update fields providedThe body is an empty object.
400A link safety messageThe new destination failed the safety check.
401Invalid or missing API keySee Authentication.
403Domain not available for this API keydomain isn't a platform domain or an active custom domain in your personal workspace.
403Scheduled links are only available on Pro and Ultra plansSetting activatesAt on the Free plan.
404Link not foundNo link with that alias on that domain in your personal workspace.
409Alias already exists for this domainThe new alias is taken on that domain.
500Failed to update link due to a server errorAn unexpected server error. Retry later.
429Rate limit exceeded. Retry in N seconds.See Rate limits.

Something missing or unclear? Email support@ishortn.ink.