Skip to main content

Endpoints

MethodPathDescription
POST/v1/auth/loginLogin, set session cookie
POST/v1/auth/logoutLogout, clear session
GET/v1/auth/meGet current user

POST /v1/auth/login

{
  "email": "you@example.com",
  "password": "your-password"
}
Response 200 — sets schedkit_session HTTP-only cookie
{
  "id": 42,
  "email": "you@example.com",
  "name": "Your Name",
  "slug": "yourname",
  "plan": "starter"
}

POST /v1/auth/logout

Clears the session cookie. No body required. Response 200
{ "ok": true }

GET /v1/auth/me

Returns the currently authenticated user. Works with both cookie and x-api-key auth. Response 200
{
  "id": 42,
  "email": "you@example.com",
  "name": "Your Name",
  "slug": "yourname",
  "plan": "starter",
  "timezone": "America/Chicago",
  "created_at": "2026-03-01T00:00:00Z"
}
Response 401 — not authenticated
{ "error": "Unauthorized" }