Skip to main content
FeaturesBy SendURL teamUpdated 5 min read

Change Where a Short Link Points Without Changing the Link

Update a SendURL short link's destination with one API call. The slug, QR code and click history stay the same, so printed codes keep working.

You can change where a SendURL short link points and keep everything else: the slug, the QR code and the click history. This is done through the API, on every plan; the console has no edit form for the destination.

It's for the times a destination has to move after the link is out: a page gets a new URL, a campaign ends and the link should point somewhere useful, or a typo slips into a newsletter.

What stays the same

When you change the destination with PATCH /links/:id, SendURL keeps:

  • The slug, so snu.to/your-slug keeps working everywhere it was shared
  • The QR code, because it encodes the short link, not the destination
  • The click history, so your charts carry on across the change
  • The title, expiry, password and project, unless you change them in the same request

How to change a destination

You need an API key: create one on the API keys page of the console (the steps are in The SendURL REST API). Then find the link's id. It's in the response when you create a link, and GET /links lists your links with their ids.

Send a PATCH with the new URL:

Change a link's destinationShell
curl -X PATCH https://api.sendurl.to/api/v1/links/LINK_ID \
  -H "Authorization: Bearer $SENDURL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destinationUrl": "https://example.com/new-page"}'

The response is the updated link. Visitors get the new destination within seconds: SendURL clears the link from its redirect cache as soon as the change is saved.

PATCH only changes the fields you send, and at least one is required. In the same request you can also:

  • Set or clear the title that labels the link in your console
  • Set, change or remove an expiry with expiresAt (see Link expiry and visit limits)
  • Set, change or remove a password (see Password-protected short links)
  • Move the link to another project with projectId
  • Switch it off or on with active

The slug itself can't be changed. If you need a different slug, create a new link and disable the old one.

Change a printed QR code's destination

A SendURL QR code encodes the short link (snu.to/<slug>?q), not your destination. So a code already printed on a poster, a menu or a package follows the link: change the destination with the PATCH above and the next scan opens the new page. Nothing needs reprinting, and scans keep counting on the same link with their QR label.

Two cautions for print. Don't delete a link that's on paper: deleting frees the slug, and whoever registers it next decides where your printed codes go. And test the new destination on a phone before the change, since every copy in circulation switches at once. More on QR codes and how to track QR code scans.

Rules worth knowing

The new destination must be an absolute URL, such as https://example.com/page, not a bare path. If the link is password protected, the destination must stay http or https: the password page can only send visitors on to a web address, so other schemes are refused for protected links.

A link disabled by moderation can still be edited, but it stays off. Disable a short link without deleting it explains what moderation means.

Only links in your API key's scope can be changed. A project key can edit its own project's links; any other link is a 404, exactly as if it didn't exist.

When to change a destination, and when not to

Changing a destination is the right move when the purpose of the link is the same but its target moved:

  • A page was renamed or moved to a new domain
  • A product sold out and the link should open its replacement
  • An event page should become the recording once the event is over
  • A link went out with a typo in its destination

It's the wrong move when the meaning changes. If snu.to/spring-sale starts opening your careers page, people who saved or printed it get something they didn't expect, and your click history mixes two different things. In that case, create a new link with its own slug, and let the old one expire or switch it off.

Your analytics carry on across the change. To compare before and after, note when you made the edit: the click list shows the time of every click, and the daily counts from GET /links/:id/stats make the switch easy to spot.

Checklist before you change a destination

  • The link's purpose is the same; only the page moved (otherwise make a new link)
  • You have the link's id and an API key that can reach its project
  • The new URL is absolute (https://…) and opens correctly on a phone
  • You've noted the time of the change, to compare clicks before and after

Every field is listed under Update a link in the API reference.

Start tracking links free.

Create your first short link with click analytics in seconds. No credit card, no sign-up to start.

Shorten a link