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/signinAuthenticate with email and password. Returns a session cookie on success.
Parameters
emailstringrequiredUser email addresspasswordstringrequiredUser password (plaintext over HTTPS)Example Response
{ "user": { "id": "...", "name": "Alice", "role": "admin" }, "success": true }GET
/api/auth/meReturns the current signed-in user's profile.
Example Response
{ "user": { "id": "uuid", "name": "Alice", "email": "alice@co.com", "role": "admin" } }POST
/api/auth/logoutDestroys the current session. Redirects to sign-in.
Presence
POST
/api/presence/pingHeartbeat endpoint. Upserts the current user's last_ping timestamp. Called automatically by the client every 30 seconds.
Example Response
{ "success": true }GET
/api/presence/statusGet presence status. Pass ?userId=<uuid> for a specific user, or no params for all users (admin only).
Parameters
userIdstring (UUID)optionalFilter to a specific userExample Response
{ "online": true, "lastSeen": "2026-01-10T09:30:00Z" }Error Codes
200Success400Bad request — missing or invalid parameters401Unauthorized — no valid session403Forbidden — insufficient role404Not found500Server error — check logs