All guides

EMAIL WORKFLOWS

Use short links in transactional email

Keep receipts, alerts, onboarding messages, and lifecycle templates readable when destinations are long.

Outcome: A clean server-side rendering flow with controllable links and no API secrets in email templates.
02

Preserve signed destinations exactly

Signed download links and account-action URLs often contain long, case-sensitive query strings. Send the complete destination in the JSON request and let URLMe store it server-side; do not trim or decode parameters before shortening.

const result = await fetch("https://api.urlme.link/v1/links", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.URLME_API_KEY,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ url: signedDestination })
});
const { data } = await result.json();
03

Match expiration to the action

When the destination should stop working after a known time, provide expiresAt while creating the short link. URLMe permanently returns HTTP 410 after expiration, even if the original destination remains reachable.

04

Pause first when investigating a bad destination

Pause temporarily if the destination is broken or under review. Resume if that external destination recovers, or expire the link when it must never deliver again. A URLMe link's destination itself cannot be edited.

Next guideCreate short links that expire permanently