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
| destinationUrl | Required. The http(s) URL to shorten. |
| customCode | Optional. Letters, numbers, hyphens, 3–30 characters. A random code is generated if omitted. |
Response fields
| shortCode | The generated or chosen code. |
| shortUrl | The full short link to share. |
| destinationUrl | Echoes the URL you sent. |
| createdAt | ISO 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
| 400 | Invalid input, a reserved custom code, or a URL flagged as unsafe by Google Safe Browsing. |
| 409 | That custom code is already taken. |
| 429 | Rate 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.