REST API · JSON · No Auth Required
API Documentation
LinkPulse exposes a simple REST API for shortening URLs, redirecting, and retrieving analytics programmatically. All endpoints return JSON. No authentication required.
Base URL
https://linkpulse.vercel.appShorten a URL and optionally set a custom short code.
Request Body
urlstringrequired
The full URL to shorten (must start with http:// or https://)
customCodestringoptional
Optional custom slug (3–20 chars, letters/numbers/-/_)
Response
{
"code": "ab12Xkp",
"shortUrl": "https://linkpulse.vercel.app/r/ab12Xkp",
"originalUrl": "https://example.com/very/long/path",
"createdAt": "2024-07-01T12:00:00.000Z"
}cURL Example
curl -X POST https://linkpulse.vercel.app/api/shorten \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/very/long/path"}'Error Codes
400Bad Request — missing or malformed body404Not Found — short code does not exist409Conflict — custom code already taken422Unprocessable — invalid URL or code format