Last Updated: 2026-03-15 | Version: 1.5.0
| Environment | URL |
|---|---|
| Production | https://vriddhi-app.vercel.app/api |
| Development | http://localhost:3000/api |
Most endpoints require authentication. We support two methods:
Used automatically when logged in via the web app. NextAuth manages the session cookie.
For external integrations. Include in the Authorization header:
Authorization: Bearer pt_live_your_api_key_hereGet your API key: Settings → API Keys → Generate Key
GET /api/health
POST /api/auth/login
POST /api/auth/register
POST /api/auth/forgot-password
GET /api/platforms (platform catalog)
GET /api/share/:slug (public profile)
All requests with a body should use Content-Type: application/json:
POST /api/tracker
Content-Type: application/json
Authorization: Bearer pt_live_abc123
{
"platformId": "clxyz123",
"category": "DSA",
"problemsSolved": 5,
"date": "2026-03-15",
"notes": "Solved 5 easy problems"
}All responses return JSON.
{
"success": true,
"data": {
"id": "clxyz",
"problemsSolved": 5,
"date": "2026-03-15T00:00:00.000Z"
},
"message": "Entry created successfully"
}{
"success": false,
"error": "VALIDATION_ERROR",
"message": "Invalid input data",
"details": [
{ "field": "date", "message": "Invalid date format" }
]
}{
"success": true,
"data": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8,
"hasNext": true,
"hasPrev": false
}
}| Header | Value | Description |
|---|---|---|
Content-Type |
application/json |
Required for POST/PUT |
Authorization |
Bearer <token> |
API key auth |
X-Request-ID |
UUID | Optional: trace requests |
| Header | Description |
|---|---|
X-RateLimit-Limit |
Max requests per window |
X-RateLimit-Remaining |
Requests left in window |
X-RateLimit-Reset |
When the window resets (Unix timestamp) |
| Code | Meaning |
|---|---|
200 |
Success |
201 |
Created |
400 |
Bad Request (validation error) |
401 |
Unauthorized (no auth / invalid token) |
403 |
Forbidden (insufficient permissions) |
404 |
Not Found |
409 |
Conflict (duplicate entry) |
429 |
Too Many Requests (rate limited) |
500 |
Internal Server Error |
Currently at v1 (no version prefix in URL). When breaking changes are needed, endpoints will be versioned:
/api/v2/tracker (future)