RightPDF API Documentation

Simple REST API for health checks, status monitoring, and user management.

API is live
Base URL:

πŸ“‘ Endpoints

GET /api/healthz Health check

Returns the current health status of the API server. Use this to monitor uptime.

Sample Response

{ "status": "ok", "timestamp": "2026-01-01T00:00:00.000Z" }

Live Response

GET /api/status Server status

Returns detailed server information including Node.js version, uptime, and configuration status.

Sample Response

{
  "status": "running",
  "version": "2.0.0",
  "node": "v20.0.0",
  "uptime": 3600,
  "database": "not configured",
  "users": 0
}

Live Response

πŸ” Authentication API

POST /api/auth/register Register new user

Request Body

{ "name": "Jane Smith", "email": "jane@example.com", "password": "mypassword" }

Success Response (200)

{ "ok": true, "user": { "id": "...", "name": "Jane Smith", "email": "jane@example.com" } }

Error Response (409 β€” email exists)

{ "error": "Email already registered" }
POST /api/auth/login Log in user

Request Body

{ "email": "jane@example.com", "password": "mypassword" }

Success Response (200)

{ "ok": true, "user": { "id": "...", "name": "Jane Smith", "email": "jane@example.com" } }

Error Response (401)

{ "error": "Invalid email or password" }
GET /api/auth/me Get current user

Returns the currently logged-in user. Requires an active session cookie.

Success Response (200 β€” logged in)

{ "user": { "id": "...", "name": "Jane", "email": "jane@example.com" } }

Error Response (401 β€” not logged in)

{ "error": "Not authenticated" }

Live Response

POST /api/auth/logout Log out

Destroys the session and logs the user out. No request body required.

Response

{ "ok": true }
POST /api/auth/forgot-password Request password reset

Request Body

{ "email": "jane@example.com" }

Response (always 200 to prevent enumeration)

{ "ok": true, "message": "If that email exists, reset instructions have been sent" }

πŸ’» cURL Examples

# Health check

curl /api/healthz

# Register

curl -X POST /api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane","email":"jane@example.com","password":"secret123"}'

# Login

curl -X POST /api/auth/login \
  -H "Content-Type: application/json" \
  -c cookies.txt \
  -d '{"email":"jane@example.com","password":"secret123"}'