Quikko’s shortener turns any long URL into a compact, shareable link backed by a 7-character alphanumeric code or a user-supplied custom alias. Before a record is ever written to the database, every destination URL is validated against a strict set of rules. Once created, the short URL’s mapping is immediately written to Redis so redirects resolve in single-digit milliseconds without touching MongoDB.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Andr21Da16/Quikko/llms.txt
Use this file to discover all available pages before exploring further.
How Short Codes Are Generated
Auto-generated short codes are produced byGenerateCode in internal/shortener/shortcode.go. The function draws cryptographically random bytes from crypto/rand (never math/rand) and maps each byte to a base62 alphabet of 62 characters — uppercase letters, lowercase letters, and digits (ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789).
The default length is 7 characters, which yields roughly 3.5 trillion unique combinations. To eliminate modulo bias, any byte that falls outside the largest multiple of 62 that fits in a single byte is discarded and re-drawn, ensuring a perfectly uniform distribution across the alphabet.
If a generated code collides with an existing one in MongoDB, the service retries automatically up to 5 times before returning an error — collisions are astronomically rare at current scale.
Base62 alphabet
A–Z, a–z, 0–9 — URL-safe characters with no padding or special symbolsCollision resistance
7 characters × 62 symbols ≈ 3.5 trillion combinations with up to 5 auto-retries
Custom Aliases
Instead of an auto-generated code, you can supply acustomAlias in the request body. Custom aliases must be 3–30 characters long and contain only alphanumeric characters and hyphens ([a-zA-Z0-9-]). If the alias is already taken, the API returns 409 ALIAS_TAKEN with no retry — you must choose a different value.
To check availability before submitting the full creation request, use the check endpoint:
URL Validation Rules
ValidateOriginalURL in internal/shortener/url_validator.go runs every destination URL through the following checks before any database or cache write occurs:
| Rule | Detail |
|---|---|
| Scheme | Must be http or https. All other schemes (ftp, file, etc.) are rejected. |
| Private IP ranges | Destinations resolving to RFC-1918 private addresses (10/8, 172.16/12, 192.168/16) are blocked. |
| Loopback addresses | localhost and the loopback range (127.0.0.0/8, ::1) are rejected. |
| Unspecified / link-local | 0.0.0.0 and the 169.254.0.0/16 link-local range are blocked. |
| Self-referential links | The service’s own domain (configured as BASE_URL) cannot be used as a destination, preventing infinite redirect loops. |
Plan Limits
Free plan
Capped at
FREE_PLAN_MAX_ACTIVE_URLS active short URLs (default 5). Attempting to create a sixth returns 403 PLAN_LIMIT_EXCEEDED.Pro plan
Unlimited active short URLs. No quota checks are performed at creation or reactivation time.
Creating a Short URL
Auto-generated code
Custom alias
Activating and Deactivating URLs
Send aPATCH request to toggle a URL’s active state:
/link-inactivo error page — not shown a raw 410 JSON response. Re-enabling the URL ("isActive": true) repopulates the Redis cache on the spot.
Deleting URLs
/link-no-encontrado error page.
Every URL creation and detail response includes a
qrCodeBase64 field — a ready-to-use PNG data URI generated on demand. There is no separate API call to fetch a QR code. See the QR Codes page for full details.