THIS WEEK Top 9 Free Instagram Apps to Enhance Your Influence Read this week's article →

API & developers

Create links via the API

Creating a short link programmatically is a single POST - No SDK required, any HTTP client works.

The one request you need

One request:

curl -X POST "https://goto.now/rest/v3/short-urls" \
  -H "X-Api-Key: YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"longUrl": "https://example.com/page", "findIfExists": true}'

The response includes shortUrl and shortCode. Store both: shortUrl is what you hand to users, and shortCode is the handle you'll need later for QR codes and visit exports.

Options worth adding to the payload

Useful options:

  • customSlug for a branded back-half.
  • title for labeling.
  • tags for organization.
  • findIfExists: true which makes batch jobs replay-safe (the same longUrl returns the same link instead of creating duplicates).

That last one deserves a habit: keep it on in any script that might run twice. If your cron job re-processes yesterday's product feed, findIfExists means you get the same 500 links back instead of 500 new duplicates polluting your stats.

Where to go deeper

Full reference: see the developer quickstart for every endpoint and parameter. Because the API follows plain REST conventions, existing generic REST tooling - Postman collections, HTTP client generators, plain cURL - Works against goto.now as-is - Point them at https://goto.now and supply your X-Api-Key header, and you're done.

Two errors you'll meet early: a 401 means the X-Api-Key header is missing or wrong, and a 400 on customSlug usually means the slug is already taken - Catch it and retry with a variation, just like you would in the dashboard. Links you create this way appear in your dashboard too, with the same private click stats as any hand-made link.

Didn't solve it? Contact support - Include the short link in question and we'll take a look.