Create Short Link
POSTMint 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
| Header | Type | Description |
|---|---|---|
| Authorization | string | Bearer token with format `Bearer sh_live_...` |
| Content-Type | string | Must be `application/json` |
Response Status Codes
| Code | Description |
|---|---|
| 201 | Short link created successfully. |
| 400 | Invalid destination URL or malformed JSON payload. |
| 401 | Missing or invalid API key. |
| 403 | Key lacks `links:write` scope or plan duration ceiling exceeded. |
| 409 | The custom code is already claimed or tombstoned. |
| 429 | Token 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 KeyKeys 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.