Use https://goto.now and send Authorization: Bearer gtn_YOUR_KEY. Keep the key in server-side secrets, never browser code, a URL, or a public repository.
Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
GET |
/api/v1/links |
List owned links with pagination and filters |
POST |
/api/v1/links |
Create or reuse a short link |
GET |
/api/v1/links/{shortCode} |
Inspect one owned link |
PATCH |
/api/v1/links/{shortCode} |
Change its destination or custom back-half |
DELETE |
/api/v1/links/{shortCode} |
Permanently retire it |
Create a link
curl https://goto.now/api/v1/links \
-H "Authorization: Bearer gtn_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: launch-link-001" \
-d '{"url":"https://example.com/launch","slug":"launch"}'
url (or longUrl) is required. slug (or customSlug) is optional and must be 3–60 letters, numbers, underscores, or hyphens. An active verified custom domain may also be supplied. Set findIfExists to true to return an existing account link for the same destination. A successful creation returns shortUrl, shortCode, and an opaque dashboardToken.
List and change links
GET /api/v1/links accepts page, limit (maximum 200), q, and tag. A PATCH body may contain a replacement url/longUrl or customSlug. DELETE is permanent: the code is retired and cannot be recovered through the API.