List Sessions

List all sessions for an instance

GET /api/v1/sessions

Returns all sessions (active and revoked) that belong to the instance associated with your secret key, ordered by most recent sign-in.

Request

curl https://myapp.clowk.dev/api/v1/sessions \
  -H "X-Clowk-Secret-Key: sk_live_..."

Headers

HeaderRequiredDescription
X-Clowk-Secret-KeyYesYour instance secret key

Response

200 — Success

[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "resource": "session",
    "data": {
      "session_id": "clk_session_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "user_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "provider": "google",
      "name": "Jane Doe",
      "email": "jane@example.com",
      "ip_address": "203.0.113.42",
      "geo_data": {},
      "logged_in_at": "2026-03-20T10:30:00Z",
      "last_signin_at": "2026-03-20T10:30:00Z",
      "revoked_at": null,
      "active": true
    }
  }
]

Fields

FieldTypeDescription
session_idstringUnique session identifier (clk_session_UUID)
user_idstringUUID of the user who owns the session
providerstringAuth provider used: google, github, twitter, password
namestringUser's display name at sign-in time
emailstringUser's email at sign-in time
ip_addressstringIP address from which the session was created
geo_dataobjectGeographic data derived from the IP (if available)
logged_in_atstringISO 8601 timestamp of the initial sign-in
last_signin_atstringISO 8601 timestamp of the most recent sign-in
revoked_atstring | nullISO 8601 timestamp of revocation, or null if active
activebooleantrue if the session has not been revoked

401 — Unauthorized

{ "error": "Unauthorized" }

On this page