Skip to content

User & Session

Manage your current user session and retrieve profile information.

Endpoints

Get Current User

GET /api/auth/get-session

Returns details of the currently authenticated user and their session.

Request

http
GET /api/auth/get-session HTTP/1.1
Authorization: Bearer <your_token>

Response

json
{
  "user": {
    "id": "user_12345",
    "email": "admin@example.com",
    "name": "John Doe",
    "role": "admin",
    "organizationId": 1
  },
  "session": {
    "id": "sess_abc123",
    "expiresAt": "2023-12-31T23:59:59.000Z"
  }
}