All guides

WORKFLOW AUTOMATION

Move manual URL shortening into an API

Automate a repeated link-creation task without abandoning the links, usage history, or controls your team already uses.

Outcome: A gradual migration from console-created links to a server-side integration in the same URLMe workspace.
01

Start from a repeated manual task

Choose one workflow where someone repeatedly copies a destination into the console, such as an onboarding message or order update. Keep occasional and exceptional links manual while automating only the predictable path.

02

Create a dedicated integration key

Name the key after the calling system and store it in that system's server-side secret manager. Never put the key in browser code, a mobile application, or a shared document.

03

Send the same operational context

Include an internal description, tags, and an optional future expiration time with the destination. The returned link appears beside manually created links and uses the same lifecycle controls and billing-period limits.

const response = 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: destination,
    description: "Order status notification",
    tags: ["orders", "transactional"]
  })
});
04

Verify before increasing volume

Confirm the integration creates the expected destination, description, and expiration; open the short link; and check that redirects appear in the workspace. Increase traffic only after authentication and plan-limit errors are handled explicitly.

Next guideShorten URLs before sending an SMS