Authentication
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 | Purpose |
|---|---|
GET |
Read the current routing configuration |
PUT |
Replace the routing configuration |
DELETE |
Disable routing and restore a direct redirect |
curl -X PUT https://goto.now/api/v1/links/launch/routing \
-H "Authorization: Bearer gtn_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"defaultUrl":"https://example.com","iosUrl":"https://apps.apple.com/app/example","countryRules":{"SG":"https://example.com/sg"},"abVariants":["https://example.com/a","https://example.com/b"]}'
The body supports defaultUrl, iosUrl, androidUrl, mobileUrl, desktopUrl, countryRules, and abVariants. It can also contain an ISO 8601 expiresAt with fallbackUrl, an eight-character-or-longer password, and a preview object with title, description, and image. DELETE keeps the short code and sends it directly to the default destination.