ShortyyDocs

Create Short Link

POST

Mint a new immutable short link with optional expiration and custom code.

Create Short Link

POST /v1/links

Creates an immutable short URL for any valid destination URL.

Request Body Parameters

▪
url *(string, required)*: The target destination URL. Must be an absolute URL using http:// or https://.
▪
expires_in *(string, optional)*: Relative duration snap-point (e.g. 30m, 1h, 2h, 1d, 7d, 1mo, 6mo, 100y). Free tier is capped at 3 hours (3h).
▪
expires_at *(string, optional)*: Explicit ISO-8601 expiration timestamp. Cannot exceed plan ceiling.
▪
custom_code *(string, optional)*: Desired custom short code (alphanumeric and dashes, 3-30 chars). Subject to availability.

Headers

HeaderTypeDescription
AuthorizationstringBearer token with format `Bearer sh_live_...`
Content-TypestringMust be `application/json`

Response Status Codes

CodeDescription
201Short link created successfully.
400Invalid destination URL or malformed JSON payload.
401Missing or invalid API key.
403Key lacks `links:write` scope or plan duration ceiling exceeded.
409The custom code is already claimed or tombstoned.
429Token bucket rate limit exhausted. Check `retryAfterSeconds`.
POST/v1/links
Scope: links:write
Server:
POSThttp://localhost:4000/v1/links
Your API Key(In-Memory Only)
Get API Key

Keys entered here are held exclusively in volatile browser memory. They are never written to disk, cookies, or storage, and reset immediately upon page reload.

JSON Request Body

Click “Send Request” to execute a live test.