Documentation/API Reference

API Reference

Jeton exposes a REST API for integrations, automation, and custom tooling.

Authentication

All API endpoints require a valid session cookie (jeton_session). Sign in first via POST /api/auth/signin, then include the cookie in subsequent requests.

Authentication

POST/api/auth/signin

Authenticate with email and password. Returns a session cookie on success.

Parameters

emailstringrequiredUser email address
passwordstringrequiredUser password (plaintext over HTTPS)

Example Response

{ "user": { "id": "...", "name": "Alice", "role": "admin" }, "success": true }
GET/api/auth/me

Returns the current signed-in user's profile.

Example Response

{ "user": { "id": "uuid", "name": "Alice", "email": "alice@co.com", "role": "admin" } }
POST/api/auth/logout

Destroys the current session. Redirects to sign-in.

Presence

POST/api/presence/ping

Heartbeat endpoint. Upserts the current user's last_ping timestamp. Called automatically by the client every 30 seconds.

Example Response

{ "success": true }
GET/api/presence/status

Get presence status. Pass ?userId=<uuid> for a specific user, or no params for all users (admin only).

Parameters

userIdstring (UUID)optionalFilter to a specific user

Example Response

{ "online": true, "lastSeen": "2026-01-10T09:30:00Z" }

Error Codes

200Success
400Bad request — missing or invalid parameters
401Unauthorized — no valid session
403Forbidden — insufficient role
404Not found
500Server error — check logs