squish.to

API docs

Create squish.to short links from a script, a build step, or anything else that isn't a browser. No account, no API key.

Create a link

POST https://www.squish.to/api/v1/links

curl -X POST https://www.squish.to/api/v1/links \
  -H "Content-Type: application/json" \
  -d '{"destinationUrl": "https://example.com/your-long-url"}'
{
  "shortCode": "aB3dE9",
  "shortUrl": "https://squish.to/aB3dE9",
  "destinationUrl": "https://example.com/your-long-url",
  "createdAt": "2026-10-11T09:14:02.000Z"
}

Request fields

destinationUrlRequired. The http(s) URL to shorten.
customCodeOptional. Letters, numbers, hyphens, 3–30 characters. A random code is generated if omitted.

Response fields

shortCodeThe generated or chosen code.
shortUrlThe full short link to share.
destinationUrlEchoes the URL you sent.
createdAtISO 8601 timestamp.

Limits

5 requests a minute and 100 a day, per IP address. Go over, and you'll get a 429 with a Retry-After header telling you how many seconds to wait.

There's no Cloudflare Turnstile check on this endpoint, unlike the web form - Turnstile needs a browser to solve a challenge in, which an API caller doesn't have. The rate limit is the gate instead.

Errors

400Invalid input, a reserved custom code, or a URL flagged as unsafe by Google Safe Browsing.
409That custom code is already taken.
429Rate limit exceeded - check Retry-After.

Analytics

This API only creates links - it doesn't return clicks or stats. That stays on the dashboard: open squish.to/stats and enter your short code to see opens, referrers, and countries for any link, including ones created through the API.

Want a machine-readable spec instead of this page? See squish.to/openapi.json.